diff options
author | Gleb Natapov <gleb@redhat.com> | 2013-04-14 09:07:37 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2013-04-16 17:34:19 -0400 |
commit | f13882d84df31a8567032b6bcbfbdd76ac378513 (patch) | |
tree | 5aea267e99be5a2f1a3c828471fbf1af1dd92aea /arch/x86 | |
parent | 26539bd0e446a54665f9d6f4c69a21140b2e1d85 (diff) |
KVM: VMX: Fix check guest state validity if a guest is in VM86 mode
If guest vcpu is in VM86 mode the vcpu state should be checked as if in
real mode.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 8d52bcf371df..c84f0cb921f9 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -3605,7 +3605,7 @@ static bool guest_state_valid(struct kvm_vcpu *vcpu) | |||
3605 | return true; | 3605 | return true; |
3606 | 3606 | ||
3607 | /* real mode guest state checks */ | 3607 | /* real mode guest state checks */ |
3608 | if (!is_protmode(vcpu)) { | 3608 | if (!is_protmode(vcpu) || (vmx_get_rflags(vcpu) & X86_EFLAGS_VM)) { |
3609 | if (!rmode_segment_valid(vcpu, VCPU_SREG_CS)) | 3609 | if (!rmode_segment_valid(vcpu, VCPU_SREG_CS)) |
3610 | return false; | 3610 | return false; |
3611 | if (!rmode_segment_valid(vcpu, VCPU_SREG_SS)) | 3611 | if (!rmode_segment_valid(vcpu, VCPU_SREG_SS)) |