aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-08-02 10:46:45 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:50:32 -0400
commitdbe7758482a870f30a86bdeefebf4fc260afef11 (patch)
tree72d6589e48193905a226175db42602d921f9a75a /arch/x86/kvm/svm.c
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>
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)
2019 if ((vmcb->control.intercept & (1ULL << INTERCEPT_VMRUN)) == 0) 2019 if ((vmcb->control.intercept & (1ULL << INTERCEPT_VMRUN)) == 0)
2020 return false; 2020 return false;
2021 2021
2022 if (vmcb->control.asid == 0)
2023 return false;
2024
2022 return true; 2025 return true;
2023} 2026}
2024 2027