]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Explicitly check for in-kernel PIC when getting ExtINT
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 21:35:51 +0000 (14:35 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 20 Jun 2025 20:52:48 +0000 (13:52 -0700)
commitcd9140ad8312234ec296d566a9d9d0b2b437ee7c
tree330784289071bdf7925de7ff4acfccf16a4c9f65
parent2c31aa747d789dc895a62efeea13452519184487
KVM: x86: Explicitly check for in-kernel PIC when getting ExtINT

Explicitly check for an in-kernel PIC when checking for a pending ExtINT
in the PIC.  Effectively swapping the split vs. full irqchip logic will
allow guarding the in-kernel I/O APIC (and PIC) emulation with a Kconfig,
and also makes it more obvious that kvm_pic_read_irq() won't result in a
NULL pointer dereference.

Opportunistically add WARNs in the fallthrough path, mostly to document
that the userspace ExtINT logic is only relevant to split IRQ chips.

Acked-by: Kai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20250611213557.294358-13-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/irq.c