KVM: x86: Add I/O APIC kconfig, delete irq_comm.c
From: | Sean Christopherson <seanjc-AT-google.com> | |
To: | Sean Christopherson <seanjc-AT-google.com>, Paolo Bonzini <pbonzini-AT-redhat.com>, Vitaly Kuznetsov <vkuznets-AT-redhat.com> | |
Subject: | [PATCH v2 00/18] KVM: x86: Add I/O APIC kconfig, delete irq_comm.c | |
Date: | Wed, 11 Jun 2025 14:35:39 -0700 | |
Message-ID: | <20250611213557.294358-1-seanjc@google.com> | |
Cc: | kvm-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, Kai Huang <kai.huang-AT-intel.com> | |
Archive-link: | Article |
Add CONFIG_KVM_IOAPIC to allow disabling support for KVM's I/O APIC (and PIC and PIT) emulation, and delete irq_comm.c by moving its contents to other files. Vitaly and Kai, I didn't apply your review/ack to the Hyper-V patch, as I ended up keeping the helper as kvm_hv_synic_set_irq() to fix the tracepoint inconsistency and the bad changelog. v2: - Keep kvm_hv_synic_set_irq() instead of renaming it kvm_hv_set_sint() to stay consistent with kvm_pic_set_irq() and kvm_ioapic_set_irq(), and with its tracepoint. [Vitaly, Kai] - Keep kvm_setup_default_irq_routine() instead of folding it into I/O APIC allocation, but rename it to kvm_setup_default_ioapic_and_pic_routing(). [Paolo]. - Move a bit more code out of x86.c (this time into i8254.c). - Guard more code with CONFIG_KVM_IOAPIC (e.g. struct kvm_pit). - Fix a changelog typo. [Kai] - Collect Kai's Acked-by. [Kai] v1: https://lore.kernel.org/all/20250519232808.2745331-1-sean... Sean Christopherson (18): KVM: x86: Trigger I/O APIC route rescan in kvm_arch_irq_routing_update() KVM: x86: Drop superfluous kvm_set_pic_irq() => kvm_pic_set_irq() wrapper KVM: x86: Drop superfluous kvm_set_ioapic_irq() => kvm_ioapic_set_irq() wrapper KVM: x86: Drop superfluous kvm_hv_set_sint() => kvm_hv_synic_set_irq() wrapper KVM: x86: Move PIT ioctl helpers to i8254.c KVM: x86: Move KVM_{GET,SET}_IRQCHIP ioctl helpers to irq.c KVM: x86: Rename irqchip_kernel() to irqchip_full() KVM: x86: Move kvm_setup_default_irq_routing() into irq.c KVM: x86: Move kvm_{request,free}_irq_source_id() to i8254.c (PIT) KVM: x86: Hardcode the PIT IRQ source ID to '2' KVM: x86: Don't clear PIT's IRQ line status when destroying PIT KVM: x86: Explicitly check for in-kernel PIC when getting ExtINT KVM: Move x86-only tracepoints to x86's trace.h KVM: x86: Add CONFIG_KVM_IOAPIC to allow disabling in-kernel I/O APIC KVM: Squash two CONFIG_HAVE_KVM_IRQCHIP #ifdefs into one KVM: selftests: Fall back to split IRQ chip if full in-kernel chip is unsupported KVM: x86: Move IRQ mask notifier infrastructure to I/O APIC emulation KVM: x86: Fold irq_comm.c into irq.c arch/x86/include/asm/kvm_host.h | 22 +- arch/x86/kvm/Kconfig | 10 + arch/x86/kvm/Makefile | 7 +- arch/x86/kvm/hyperv.c | 10 +- arch/x86/kvm/hyperv.h | 3 +- arch/x86/kvm/i8254.c | 90 +++- arch/x86/kvm/i8254.h | 17 +- arch/x86/kvm/i8259.c | 17 +- arch/x86/kvm/ioapic.c | 55 ++- arch/x86/kvm/ioapic.h | 24 +- arch/x86/kvm/irq.c | 427 ++++++++++++++++++- arch/x86/kvm/irq.h | 35 +- arch/x86/kvm/irq_comm.c | 469 --------------------- arch/x86/kvm/lapic.c | 7 +- arch/x86/kvm/trace.h | 80 ++++ arch/x86/kvm/x86.c | 164 +------ include/linux/kvm_host.h | 9 +- include/trace/events/kvm.h | 84 +--- tools/testing/selftests/kvm/lib/kvm_util.c | 13 +- virt/kvm/irqchip.c | 2 - 20 files changed, 746 insertions(+), 799 deletions(-) delete mode 100644 arch/x86/kvm/irq_comm.c base-commit: 61374cc145f4a56377eaf87c7409a97ec7a34041 -- 2.50.0.rc1.591.g9c95f17f64-goog