]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: x86: Hide KVM_IRQCHIP_KERNEL behind CONFIG_KVM_IOAPIC=y
authorSean Christopherson <seanjc@google.com>
Sat, 6 Dec 2025 00:43:11 +0000 (16:43 -0800)
committerSean Christopherson <seanjc@google.com>
Mon, 12 Jan 2026 17:31:42 +0000 (09:31 -0800)
Enumerate KVM_IRQCHIP_KERNEL if and only if support for an in-kernel I/O
APIC is enabled, as all usage is likewise guarded by CONFIG_KVM_IOAPIC=y.

Link: https://patch.msgid.link/20251206004311.479939-10-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/include/asm/kvm_host.h

index 5a3bfa293e8b1acfa30ee44cc5e42a11486424be..8a979c389bc0ced5375f7d1504914f4f2abb30de 100644 (file)
@@ -1222,7 +1222,9 @@ struct kvm_xen {
 
 enum kvm_irqchip_mode {
        KVM_IRQCHIP_NONE,
+#ifdef CONFIG_KVM_IOAPIC
        KVM_IRQCHIP_KERNEL,       /* created with KVM_CREATE_IRQCHIP */
+#endif
        KVM_IRQCHIP_SPLIT,        /* created with KVM_CAP_SPLIT_IRQCHIP */
 };