Two fixes and two cleanups related to KVM's posted interrupt wakeup handler. Fix #1 ensures any in-flight IRQs finish after changing the handler. Fix #2 actually uninstalls KVM's handler so that a spurious IRQ won't jump into a freed module. AFAIK, no one has actually hit these bugs as it would require a really spurious IRQ, or a bug+race elsehwere that caused a device to post an interrupt well after a KVM guest is torn down. Sean Christopherson (4): x86/irq: Ensure PI wakeup handler is unregistered before module unload KVM: VMX: Unregister posted interrupt wakeup handler on hardware unsetup x86/irq: KVM: Harden posted interrupt (un)registration paths KVM: VMX: Register posted interrupt wakeup handler iff APICv is enabled arch/x86/include/asm/irq.h | 3 ++- arch/x86/kernel/irq.c | 30 +++++++++++++++++++++--------- arch/x86/kvm/vmx/vmx.c | 9 +++++++-- 3 files changed, 30 insertions(+), 12 deletions(-) -- 2.33.0.882.g93a45727a2-goog