]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
KVM: VMX: Return real real-mode segment data even if emulate_invalid_guest_state=1
authorAvi Kivity <avi@redhat.com>
Tue, 21 Aug 2012 14:07:07 +0000 (17:07 +0300)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 27 Aug 2012 23:02:21 +0000 (20:02 -0300)
emulate_invalid_guest_state=1 doesn't mean we don't munge the segments in the
vmcs; we do.  So we need to return the real ones (maintained by vmx_set_segment).

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c

index fd21eb454663ca75e8f3c1923b5e430d73956379..0d6872621ab5b487f934d4fb50090e9ddd1ac5cf 100644 (file)
@@ -3108,8 +3108,7 @@ static void vmx_get_segment(struct kvm_vcpu *vcpu,
        if (vmx->rmode.vm86_active
            && (seg == VCPU_SREG_TR || seg == VCPU_SREG_ES
                || seg == VCPU_SREG_DS || seg == VCPU_SREG_FS
-               || seg == VCPU_SREG_GS)
-           && !emulate_invalid_guest_state) {
+               || seg == VCPU_SREG_GS)) {
                *var = vmx->rmode.segs[seg];
                if (seg == VCPU_SREG_TR
                    || var->selector == vmx_read_guest_seg_selector(vmx, seg))