summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
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 /arch/x86/kvm/svm.c
parent52c65a30a5c6f31cd66dba57c22d18cafa5e327f (diff)
downloadop-kernel-dev-dbe7758482a870f30a86bdeefebf4fc260afef11.zip
op-kernel-dev-dbe7758482a870f30a86bdeefebf4fc260afef11.tar.gz
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>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-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 a0e5c7e..af5b9ea 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;
}
OpenPOWER on IntegriCloud