diff --git a/src/arch/x86/kvm/x86_cpu.cc b/src/arch/x86/kvm/x86_cpu.cc index af041a5066..49274da110 100644 --- a/src/arch/x86/kvm/x86_cpu.cc +++ b/src/arch/x86/kvm/x86_cpu.cc @@ -741,12 +741,7 @@ setKvmSegmentReg(ThreadContext *tc, struct kvm_segment &kvm_seg, kvm_seg.l = attr.longMode; kvm_seg.g = attr.granularity; kvm_seg.avl = attr.avl; - - // A segment is normally unusable when the selector is zero. There - // is a attr.unusable flag in gem5, but it seems unused. qemu - // seems to set this to 0 all the time, so we just do the same and - // hope for the best. - kvm_seg.unusable = 0; + kvm_seg.unusable = attr.unusable; } static inline void