Skip to content

KVM: x86: Add I/O APIC kconfig, delete irq_comm.c

Sean Christopherson kvm lkml 2 versions – Applied

Status from this message: Applied to kvm-x86 irqs, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest18 patches 13 repliesApplied
  2. v115 patches 16 repliesSuperseded

Changes in v2 from the cover letter

- 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]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/18KVM: x86: Trigger I/O APIC route rescan in kvm_arch_irq_routing_update()arch/x86/kvm/irq_comm.c include/linux/kvm_host.h virt/kvm/irqchip.c+3 -130 replies
2/18KVM: x86: Drop superfluous kvm_set_pic_irq() => kvm_pic_set_irq() wrapperarch/x86/include/asm/kvm_host.h arch/x86/kvm/i8259.c arch/x86/kvm/irq.h +1 more+7 -110 replies
3/18KVM: x86: Drop superfluous kvm_set_ioapic_irq() => kvm_ioapic_set_irq() wrapperarch/x86/kvm/ioapic.c arch/x86/kvm/ioapic.h arch/x86/kvm/irq_comm.c+8 -140 replies
4/18KVM: x86: Drop superfluous kvm_hv_set_sint() => kvm_hv_synic_set_irq() wrapperarch/x86/kvm/hyperv.c arch/x86/kvm/hyperv.h arch/x86/kvm/irq_comm.c+12 -195 replies
5/18KVM: x86: Move PIT ioctl helpers to i8254.carch/x86/kvm/i8254.c arch/x86/kvm/i8254.h arch/x86/kvm/x86.c+84 -812 replies
6/18KVM: x86: Move KVM_{GET,SET}_IRQCHIP ioctl helpers to irq.carch/x86/kvm/irq.c arch/x86/kvm/irq.h arch/x86/kvm/x86.c+59 -552 replies
7/18KVM: x86: Rename irqchip_kernel() to irqchip_full()arch/x86/kvm/ioapic.h arch/x86/kvm/irq.c arch/x86/kvm/irq.h +2 more+16 -162 replies
8/18KVM: x86: Move kvm_setup_default_irq_routing() into irq.carch/x86/kvm/irq.c arch/x86/kvm/irq.h arch/x86/kvm/irq_comm.c +1 more+35 -341 reply
9/18KVM: x86: Move kvm_{request,free}_irq_source_id() to i8254.c (PIT)arch/x86/kvm/i8254.c arch/x86/kvm/irq_comm.c include/linux/kvm_host.h+44 -460 replies
10/18KVM: x86: Hardcode the PIT IRQ source ID to '2'arch/x86/include/asm/kvm_host.h arch/x86/kvm/i8254.c arch/x86/kvm/i8254.h +2 more+8 -560 replies
11/18KVM: x86: Don't clear PIT's IRQ line status when destroying PITarch/x86/include/asm/kvm_host.h arch/x86/kvm/i8254.c arch/x86/kvm/i8259.c +2 more+0 -330 replies
12/18KVM: x86: Explicitly check for in-kernel PIC when getting ExtINTarch/x86/kvm/irq.c+16 -90 replies
13/18KVM: Move x86-only tracepoints to x86's trace.harch/x86/kvm/ioapic.c arch/x86/kvm/irq_comm.c arch/x86/kvm/trace.h +1 more+82 -850 replies
14/18KVM: x86: Add CONFIG_KVM_IOAPIC to allow disabling in-kernel I/O APICarch/x86/include/asm/kvm_host.h arch/x86/kvm/Kconfig arch/x86/kvm/Makefile +9 more+65 -100 replies
15/18KVM: Squash two CONFIG_HAVE_KVM_IRQCHIP #ifdefs into oneinclude/trace/events/kvm.h+0 -30 replies
16/18KVM: selftests: Fall back to split IRQ chip if full in-kernel chip is unsupportedtools/testing/selftests/kvm/lib/kvm_util.c+12 -10 replies
17/18KVM: x86: Move IRQ mask notifier infrastructure to I/O APIC emulationarch/x86/include/asm/kvm_host.h arch/x86/kvm/i8254.h arch/x86/kvm/i8259.c +4 more+57 -500 replies
18/18KVM: x86: Fold irq_comm.c into irq.carch/x86/kvm/Makefile arch/x86/kvm/irq.c arch/x86/kvm/irq_comm.c+305 -3300 replies

Reviews trailers per patch

All 18 patches have a Reviewed-by or Acked-by.

PatchKai HuangVitaly Kuznetsov
1/18A-b
2/18A-b
3/18A-b
4/18A-b R-b
5/18A-b
6/18A-b
7/18A-b
8/18A-b
9/18A-b
10/18A-b
11/18A-b
12/18A-b
13/18A-b
14/18A-b
15/18A-b
16/18A-b
17/18A-b
18/18A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/18] KVM: x86: Add I/O APIC kconfig, delete irq_comm.c

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/[email protected]

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

Signature · 1 line
2.50.0.rc1.591.g9c95f17f64-goog