KVM: VMX: avoid running vmx_handle_exit_irqoff in case of emulation
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 26 Aug 2021 09:57:49 +0000 (12:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:47 +0000 (09:50 +0200)
commitbf36224463356526f56d992d3f6d09cbd57e2d2f
treed75619014ae182e194a34dc37b0754f814be73b7
parentc06e6ff2fcc34476eda29c5c14ca0db962f500cf
KVM: VMX: avoid running vmx_handle_exit_irqoff in case of emulation

commit 81b4b56d4f8130bbb99cf4e2b48082e5b4cfccb9 upstream.

If we are emulating an invalid guest state, we don't have a correct
exit reason, and thus we shouldn't do anything in this function.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210826095750.1650467-2-mlevitsk@redhat.com>
Cc: stable@vger.kernel.org
Fixes: 95b5a48c4f2b ("KVM: VMX: Handle NMIs, #MCs and async #PFs in common irqs-disabled fn", 2019-06-18)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/vmx/vmx.c