Skip to content

Commit

Permalink
KVM: SVM: Check for asid != 0 on nested vmrun
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel authored and Avi Kivity committed Oct 24, 2010
1 parent 52c65a3 commit dbe7758
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit dbe7758

Please sign in to comment.