KVM: VMX: if unrestricted guest is enabled vcpu state is always valid.
authorGleb Natapov <gleb@redhat.com>
Mon, 21 Jan 2013 13:36:43 +0000 (15:36 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Thu, 24 Jan 2013 02:40:26 +0000 (00:40 -0200)
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/vmx.c

index edfbe94c622ccdab8df7f49c54c45f591474963c..f942b201b3453a91be118b9a7c755b01c81d53b4 100644 (file)
@@ -3488,6 +3488,9 @@ static bool cs_ss_rpl_check(struct kvm_vcpu *vcpu)
  */
 static bool guest_state_valid(struct kvm_vcpu *vcpu)
 {
+       if (enable_unrestricted_guest)
+               return true;
+
        /* real mode guest state checks */
        if (!is_protmode(vcpu)) {
                if (!rmode_segment_valid(vcpu, VCPU_SREG_CS))