Don't WARN on "lost" IRQs if the VM has an in-kernel PIC or Xen emulation is
enabled, as vPIC and Xen emulation have guest-controllable and/or VM-wide IRQs
that can legitimately be consumed/deasserted without holding the vCPU's mutex.
v3:
- Add a helper to weed out the problematic cases.
- WARN in the "else" path so that there's only a single conditional branch
in the happy path.
- Exempt Xen. [Sashiko]
v2:
- https://lore.kernel.org/all/86078441-92eb-4461-b823-7d3539ac5859@mail.kernel.org
- Restrict the warning exemption to the in-kernel PIC case.
- Remove the pr_err_ratelimited() logging.
- Preserve the WARN_ON_ONCE() for non-PIC interrupt sources.
v1: https://lore.kernel.org/all/345e9d6c-d7d9-4bab-adb3-d6a7bd27599f@mail.kernel.org
Sean Christopherson (2):
KVM: x86: Don't WARN if IRQ disappears because it was cleared from the
PIC
KVM: x86: Don't WARN if IRQ disappears when Xen emulation is enabled.
arch/x86/kvm/irq.h | 20 ++++++++++++++++++++
arch/x86/kvm/vmx/nested.c | 4 +++-
arch/x86/kvm/x86.c | 4 +++-
3 files changed, 26 insertions(+), 2 deletions(-)
base-commit: a204badd8432f93b7e862e7dac6db0fe3d65f370
--
2.55.0.229.g6434b31f56-goog