summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-08-02 16:46:45 +0200
committerAvi Kivity <avi@redhat.com>2010-10-24 10:50:32 +0200
commitdbe7758482a870f30a86bdeefebf4fc260afef11 (patch)
tree72d6589e48193905a226175db42602d921f9a75a
parent52c65a30a5c6f31cd66dba57c22d18cafa5e327f (diff)
KVM: SVM: Check for asid != 0 on nested vmrun
This patch lets a nested vmrun fail if the L1 hypervisor left the asid zero. This fixes the asid_zero unit test. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
-rw-r--r--arch/x86/kvm/svm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index a0e5c7e2610..af5b9ea5196 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2019,6 +2019,9 @@ static bool nested_vmcb_checks(struct vmcb *vmcb)
if ((vmcb->control.intercept & (1ULL << INTERCEPT_VMRUN)) == 0)
return false;
+ if (vmcb->control.asid == 0)
+ return false;
+
return true;
}