Skip to content

Commit ebdb3db

Browse files
vittyvkbonzini
authored andcommitted
KVM: nSVM: reset nested_run_pending upon nested_svm_vmrun_msrpm() failure
WARN_ON_ONCE(svm->nested.nested_run_pending) in nested_svm_vmexit() will fire if nested_run_pending remains '1' but it doesn't really need to, we are already failing and not going to run nested guest. Signed-off-by: Vitaly Kuznetsov <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 8c00865 commit ebdb3db

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kvm/svm/nested.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,8 @@ int nested_svm_vmrun(struct vcpu_svm *svm)
493493
enter_svm_guest_mode(svm, vmcb_gpa, nested_vmcb);
494494

495495
if (!nested_svm_vmrun_msrpm(svm)) {
496+
svm->nested.nested_run_pending = 0;
497+
496498
svm->vmcb->control.exit_code = SVM_EXIT_ERR;
497499
svm->vmcb->control.exit_code_hi = 0;
498500
svm->vmcb->control.exit_info_1 = 0;

0 commit comments

Comments
 (0)