summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorJoerg Roedel2010-08-02 16:46:45 +0200
committerAvi Kivity2010-10-24 10:50:32 +0200
commitdbe7758482a870f30a86bdeefebf4fc260afef11 (patch)
tree72d6589e48193905a226175db42602d921f9a75a /arch/x86/kvm/svm.c
parentKVM: SVM: Check for nested vmrun intercept before emulating vmrun (diff)
downloadkernel-qcow2-linux-dbe7758482a870f30a86bdeefebf4fc260afef11.tar.gz
kernel-qcow2-linux-dbe7758482a870f30a86bdeefebf4fc260afef11.tar.xz
kernel-qcow2-linux-dbe7758482a870f30a86bdeefebf4fc260afef11.zip
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 a0e5c7e26104..af5b9ea51965 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;
}