summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorVitaly Kuznetsov <vkuznets@redhat.com>2020-07-10 16:11:51 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-07-10 12:54:25 -0400
commitebdb3dba7b900a6b280d70f08befa0b96e0f806e (patch)
treebb86eb4ad74346860074f5b9880a9b1e58dcc68a /arch
parent8c008659aa43be97c60c1633074b8f52f9f4445c (diff)
downloadlinux-stable-ebdb3dba7b900a6b280d70f08befa0b96e0f806e.tar.gz
linux-stable-ebdb3dba7b900a6b280d70f08befa0b96e0f806e.tar.bz2
linux-stable-ebdb3dba7b900a6b280d70f08befa0b96e0f806e.zip
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 <vkuznets@redhat.com> Message-Id: <20200710141157.1640173-4-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/svm/nested.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 19e1e99a7458..bd0df1b706ad 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -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;