* [PATCH] KVM: VMX: Fix check guest state validity if a guest is in VM86 mode
@ 2013-04-14 13:07 Gleb Natapov
2013-04-16 21:34 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Gleb Natapov @ 2013-04-14 13:07 UTC (permalink / raw)
To: kvm; +Cc: mtosatti, pbonzini
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>
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index d268677..fec7c48 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -3554,7 +3554,7 @@ static bool guest_state_valid(struct kvm_vcpu *vcpu)
return true;
/* real mode guest state checks */
- if (!is_protmode(vcpu)) {
+ if (!is_protmode(vcpu) || (vmx_get_rflags(vcpu) & X86_EFLAGS_VM)) {
if (!rmode_segment_valid(vcpu, VCPU_SREG_CS))
return false;
if (!rmode_segment_valid(vcpu, VCPU_SREG_SS))
--
Gleb.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-04-16 21:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-14 13:07 [PATCH] KVM: VMX: Fix check guest state validity if a guest is in VM86 mode Gleb Natapov
2013-04-16 21:34 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox