Skip to content

Commit

Permalink
KVM: nSVM: reset nested_run_pending upon nested_svm_vmrun_msrpm() fai…
Browse files Browse the repository at this point in the history
…lure

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 <vkuznets@redhat.com>
Message-Id: <20200710141157.1640173-4-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Vitaly Kuznetsov authored and Paolo Bonzini committed Jul 10, 2020
1 parent 8c00865 commit ebdb3db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/kvm/svm/nested.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,8 @@ int nested_svm_vmrun(struct vcpu_svm *svm)
enter_svm_guest_mode(svm, vmcb_gpa, nested_vmcb);

if (!nested_svm_vmrun_msrpm(svm)) {
svm->nested.nested_run_pending = 0;

svm->vmcb->control.exit_code = SVM_EXIT_ERR;
svm->vmcb->control.exit_code_hi = 0;
svm->vmcb->control.exit_info_1 = 0;
Expand Down

0 comments on commit ebdb3db

Please sign in to comment.