KVM: x86: Raise an event request when processing NMIs if an NMI is pending
authorSean Christopherson <seanjc@google.com>
Mon, 27 Feb 2023 08:40:10 +0000 (14:10 +0530)
committerSean Christopherson <seanjc@google.com>
Wed, 22 Mar 2023 19:34:32 +0000 (12:34 -0700)
commit2cb9317377caaec647d7485bc53ab33a0b54f27c
treedc7cae9536001d58f6e2f3f13b50deadb36e2991
parent772f254d4d5687ee349cbe443959bc01304880d6
KVM: x86: Raise an event request when processing NMIs if an NMI is pending

Don't raise KVM_REQ_EVENT if no NMIs are pending at the end of
process_nmi().  Finishing process_nmi() without a pending NMI will become
much more likely when KVM gains support for AMD's vNMI, which allows
pending vNMIs in hardware, i.e. doesn't require explicit injection.

Signed-off-by: Santosh Shukla <Santosh.Shukla@amd.com>
Link: https://lore.kernel.org/r/20230227084016.3368-6-santosh.shukla@amd.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c