KVM: SVM: Make an event request if INIT or SIPI is pending when GIF is set
authorSean Christopherson <seanjc@google.com>
Wed, 21 Sep 2022 00:31:55 +0000 (00:31 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Sep 2022 16:37:19 +0000 (12:37 -0400)
commit0bba8fc24c7593068d5defd0238b723bf7aecc84
tree95513cfdb2a5f8d47b45280fa3042a8437c2dc67
parentbf7f9352af5d184f28d352a58cb9230e404f8c5c
KVM: SVM: Make an event request if INIT or SIPI is pending when GIF is set

Set KVM_REQ_EVENT if INIT or SIPI is pending when the guest enables GIF.
INIT in particular is blocked when GIF=0 and needs to be processed when
GIF is toggled to '1'.  This bug has been masked by (a) KVM calling
->check_nested_events() in the core run loop and (b) hypervisors toggling
GIF from 0=>1 only when entering guest mode (L1 entering L2).

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220921003201.1441511-7-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c