diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-05-28 23:27:56 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-05-28 23:27:56 -0700 |
commit | 7f50ea05ac848e22a70c9a9471904637aea2f907 (patch) | |
tree | 208fb8a40376ccb6b6fb90576c4506f34416930d /src/arch/x86/faults.cc | |
parent | 47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca (diff) | |
download | gem5-7f50ea05ac848e22a70c9a9471904637aea2f907.tar.xz |
X86: Keep track of more descriptor state to accomodate KVM.
Diffstat (limited to 'src/arch/x86/faults.cc')
-rw-r--r-- | src/arch/x86/faults.cc | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/arch/x86/faults.cc b/src/arch/x86/faults.cc index 10b539248..34137444f 100644 --- a/src/arch/x86/faults.cc +++ b/src/arch/x86/faults.cc @@ -208,11 +208,18 @@ namespace X86ISA tc->setMiscReg(MISCREG_EFER, 0); SegAttr dataAttr = 0; + dataAttr.dpl = 0; + dataAttr.unusable = 0; + dataAttr.defaultSize = 0; + dataAttr.longMode = 0; + dataAttr.avl = 0; + dataAttr.granularity = 0; + dataAttr.present = 1; + dataAttr.type = 3; dataAttr.writable = 1; dataAttr.readable = 1; dataAttr.expandDown = 0; - dataAttr.dpl = 0; - dataAttr.defaultSize = 0; + dataAttr.system = 1; for (int seg = 0; seg != NUM_SEGMENTREGS; seg++) { tc->setMiscReg(MISCREG_SEG_SEL(seg), 0); @@ -223,11 +230,18 @@ namespace X86ISA } SegAttr codeAttr = 0; + codeAttr.dpl = 0; + codeAttr.unusable = 0; + codeAttr.defaultSize = 0; + codeAttr.longMode = 0; + codeAttr.avl = 0; + codeAttr.granularity = 0; + codeAttr.present = 1; + codeAttr.type = 10; codeAttr.writable = 0; codeAttr.readable = 1; codeAttr.expandDown = 0; - codeAttr.dpl = 0; - codeAttr.defaultSize = 0; + codeAttr.system = 1; tc->setMiscReg(MISCREG_CS, 0xf000); tc->setMiscReg(MISCREG_CS_BASE, |