diff --git a/src/arch/x86/fs_workload.cc b/src/arch/x86/fs_workload.cc index b66ddfd13c..a69e50b8d9 100644 --- a/src/arch/x86/fs_workload.cc +++ b/src/arch/x86/fs_workload.cc @@ -189,6 +189,12 @@ FsWorkload::initState() // 32 bit data segment SegDescriptor dsDesc = initDesc; + dsDesc.type.e = 0; + dsDesc.type.w = 1; + dsDesc.d = 1; + dsDesc.baseHigh = 0; + dsDesc.baseLow = 0; + uint64_t dsDescVal = dsDesc; phys_proxy.writeBlob(GDTBase + numGDTEntries * 8, (&dsDescVal), 8); @@ -204,10 +210,16 @@ FsWorkload::initState() tc->setMiscReg(MISCREG_SS, (RegVal)ds); tc->setMiscReg(MISCREG_TSL, 0); + SegAttr ldtAttr = 0; + ldtAttr.unusable = 1; + tc->setMiscReg(MISCREG_TSL_ATTR, ldtAttr); tc->setMiscReg(MISCREG_TSG_BASE, GDTBase); tc->setMiscReg(MISCREG_TSG_LIMIT, 8 * numGDTEntries - 1); SegDescriptor tssDesc = initDesc; + tssDesc.type = 0xB; + tssDesc.s = 0; + uint64_t tssDescVal = tssDesc; phys_proxy.writeBlob(GDTBase + numGDTEntries * 8, (&tssDescVal), 8);