Skip to content

Commit 4cf3d3e

Browse files
sean-jcbonzini
authored andcommitted
KVM: selftests: Don't skip L2's VMCALL in SMM test for SVM guest
Don't skip the vmcall() in l2_guest_code() prior to re-entering L2, doing so will result in L2 running to completion, popping '0' off the stack for RET, jumping to address '0', and ultimately dying with a triple fault shutdown. It's not at all obvious why the test re-enters L2 and re-executes VMCALL, but presumably it serves a purpose. The VMX path doesn't skip vmcall(), and the test can't possibly have passed on SVM, so just do what VMX does. Fixes: d951b22 ("KVM: selftests: smm_test: Test SMM enter from L2") Cc: Maxim Levitsky <[email protected]> Signed-off-by: Sean Christopherson <[email protected]> Message-Id: <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Tested-by: Vitaly Kuznetsov <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 033a3ea commit 4cf3d3e

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

tools/testing/selftests/kvm/x86_64/smm_test.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ static void guest_code(void *arg)
105105

106106
if (cpu_has_svm()) {
107107
run_guest(svm->vmcb, svm->vmcb_gpa);
108-
svm->vmcb->save.rip += 3;
109108
run_guest(svm->vmcb, svm->vmcb_gpa);
110109
} else {
111110
vmlaunch();

0 commit comments

Comments
 (0)