kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] KVM: x86: Add I/O APIC kconfig, delete irq_comm.c
@ 2025-05-19 23:27 Sean Christopherson
  2025-05-19 23:27 ` [PATCH 01/15] KVM: x86: Trigger I/O APIC route rescan in kvm_arch_irq_routing_update() Sean Christopherson
                   ` (16 more replies)
  0 siblings, 17 replies; 32+ messages in thread
From: Sean Christopherson @ 2025-05-19 23:27 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini, Vitaly Kuznetsov; +Cc: kvm, linux-kernel

This series is prep work for the big device posted IRQs overhaul[1], in which
Paolo suggested getting rid of arch/x86/kvm/irq_comm.c[2].  As I started
chipping away bits of irq_comm.c to make the final code movement to irq.c as
small as possible, I realized that (a) a rather large amount of irq_comm.c was
actually I/O APIC code and (b) this would be a perfect opportunity to further
isolate the I/O APIC code.

So, a bit of hacking later and voila, CONFIG_KVM_IOAPIC.  Similar to KVM's SMM
and Xen Kconfigs, this is something we would enable in production straightaway,
if we could magically fast-forwarded our kernel, as fully disabling I/O APIC
emulation puts a decent chunk of guest-visible surface entirely out of reach.

Side topic, Paolo's recollection that irq_comm.c was to hold common APIs between
x86 and Itanium was spot on.  Though when I read Paolo's mail, I parsed "ia64"
as x86-64.  I got quite a good laugh when I eventually realized that he really
did mean ia64 :-)

[1] https://lore.kernel.org/all/20250404193923.1413163-1-seanjc@google.com
[2] https://lore.kernel.org/all/cf4d9b81-c1ab-40a6-8c8c-36ad36b9be63@redhat.com

Sean Christopherson (15):
  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: Fold kvm_setup_default_irq_routing() into kvm_ioapic_init()
  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                       |  11 +-
 arch/x86/kvm/i8254.h                       |   3 +-
 arch/x86/kvm/i8259.c                       |  17 +-
 arch/x86/kvm/ioapic.c                      |  87 +++-
 arch/x86/kvm/ioapic.h                      |  22 +-
 arch/x86/kvm/irq.c                         | 336 ++++++++++++++-
 arch/x86/kvm/irq.h                         |   3 +-
 arch/x86/kvm/irq_comm.c                    | 469 ---------------------
 arch/x86/kvm/lapic.c                       |   7 +-
 arch/x86/kvm/trace.h                       |  80 ++++
 arch/x86/kvm/x86.c                         |  37 +-
 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, 577 insertions(+), 655 deletions(-)
 delete mode 100644 arch/x86/kvm/irq_comm.c


base-commit: 3f7b307757ecffc1c18ede9ee3cf9ce8101f3cc9
-- 
2.49.0.1101.gccaa498523-goog


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2025-06-19 10:06 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-19 23:27 [PATCH 00/15] KVM: x86: Add I/O APIC kconfig, delete irq_comm.c Sean Christopherson
2025-05-19 23:27 ` [PATCH 01/15] KVM: x86: Trigger I/O APIC route rescan in kvm_arch_irq_routing_update() Sean Christopherson
2025-05-19 23:27 ` [PATCH 02/15] KVM: x86: Drop superfluous kvm_set_pic_irq() => kvm_pic_set_irq() wrapper Sean Christopherson
2025-05-19 23:27 ` [PATCH 03/15] KVM: x86: Drop superfluous kvm_set_ioapic_irq() => kvm_ioapic_set_irq() wrapper Sean Christopherson
2025-05-19 23:27 ` [PATCH 04/15] KVM: x86: Drop superfluous kvm_hv_set_sint() => kvm_hv_synic_set_irq() wrapper Sean Christopherson
2025-05-20  9:57   ` Vitaly Kuznetsov
2025-05-29 11:37   ` Huang, Kai
2025-05-29 14:39     ` Sean Christopherson
2025-05-29 22:34       ` Huang, Kai
2025-05-19 23:27 ` [PATCH 05/15] KVM: x86: Fold kvm_setup_default_irq_routing() into kvm_ioapic_init() Sean Christopherson
2025-06-04 16:43   ` Paolo Bonzini
2025-05-19 23:27 ` [PATCH 06/15] KVM: x86: Move kvm_{request,free}_irq_source_id() to i8254.c (PIT) Sean Christopherson
2025-05-19 23:28 ` [PATCH 07/15] KVM: x86: Hardcode the PIT IRQ source ID to '2' Sean Christopherson
2025-05-19 23:28 ` [PATCH 08/15] KVM: x86: Don't clear PIT's IRQ line status when destroying PIT Sean Christopherson
2025-05-29 11:41   ` Huang, Kai
2025-05-19 23:28 ` [PATCH 09/15] KVM: x86: Explicitly check for in-kernel PIC when getting ExtINT Sean Christopherson
2025-05-19 23:28 ` [PATCH 10/15] KVM: Move x86-only tracepoints to x86's trace.h Sean Christopherson
2025-05-19 23:28 ` [PATCH 11/15] KVM: x86: Add CONFIG_KVM_IOAPIC to allow disabling in-kernel I/O APIC Sean Christopherson
2025-05-29 11:55   ` Huang, Kai
2025-05-29 11:57     ` Huang, Kai
2025-05-29 14:31       ` Sean Christopherson
2025-05-29 22:51         ` Huang, Kai
2025-05-29 23:08           ` Sean Christopherson
2025-05-29 23:55             ` Huang, Kai
2025-06-04 16:54             ` Paolo Bonzini
2025-06-19 10:05               ` Naveen N Rao
2025-05-19 23:28 ` [PATCH 12/15] KVM: Squash two CONFIG_HAVE_KVM_IRQCHIP #ifdefs into one Sean Christopherson
2025-05-19 23:28 ` [PATCH 13/15] KVM: selftests: Fall back to split IRQ chip if full in-kernel chip is unsupported Sean Christopherson
2025-05-19 23:28 ` [PATCH 14/15] KVM: x86: Move IRQ mask notifier infrastructure to I/O APIC emulation Sean Christopherson
2025-05-19 23:28 ` [PATCH 15/15] KVM: x86: Fold irq_comm.c into irq.c Sean Christopherson
2025-05-29 11:58 ` [PATCH 00/15] KVM: x86: Add I/O APIC kconfig, delete irq_comm.c Huang, Kai
2025-06-04 16:56 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).