summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2013-01-21 15:36:43 +0200
committerMarcelo Tosatti <mtosatti@redhat.com>2013-01-24 00:40:26 -0200
commitc5e97c80b5ddd6139bdadcbd44e263c2a3e7fae6 (patch)
tree05a80bed7b6148eef85c89dbd5ecaeae4f91148f /arch/x86/kvm
parent2f143240cb822c0d23ad591b89fe10e7c1f842f5 (diff)
downloadop-kernel-dev-c5e97c80b5ddd6139bdadcbd44e263c2a3e7fae6.zip
op-kernel-dev-c5e97c80b5ddd6139bdadcbd44e263c2a3e7fae6.tar.gz
KVM: VMX: if unrestricted guest is enabled vcpu state is always valid.
Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/vmx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index edfbe94..f942b20 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -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))
OpenPOWER on IntegriCloud