Skip to content

KVM: x86: APIC and I/O APIC cleanups

Sean Christopherson kvm lkml 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/9KVM: x86: Drop ASSERT()s on APIC/vCPU being non-NULLarch/x86/kvm/lapic.c+0 -50 replies
2/9KVM: x86: Drop guest/user-triggerable asserts on IRR/ISR vectorsarch/x86/kvm/lapic.c+2 -120 replies
3/9KVM: x86: Drop ASSERT() on I/O APIC EOIs being only for LEVEL_to WARN_ON_ONCEarch/x86/kvm/ioapic.c+0 -60 replies
4/9KVM: x86: Drop guest-triggerable ASSERT()s on I/O APIC access alignmentarch/x86/kvm/ioapic.c arch/x86/kvm/ioapic.h+0 -170 replies
5/9KVM: x86: Drop MAX_NR_RESERVED_IOAPIC_PINS, use KVM_MAX_IRQ_ROUTES directlyarch/x86/kvm/ioapic.h arch/x86/kvm/x86.c+1 -20 replies
6/9KVM: x86: Add a wrapper to handle common case of IRQ delivery without dest_maparch/x86/kvm/hyperv.c arch/x86/kvm/ioapic.c arch/x86/kvm/irq.c +4 more+36 -190 replies
7/9KVM: x86: Fold "struct dest_map" into "struct rtc_status"arch/x86/kvm/ioapic.c arch/x86/kvm/ioapic.h arch/x86/kvm/lapic.c +1 more+34 -390 replies
8/9KVM: x86: Bury ioapic.h definitions behind CONFIG_KVM_IOAPICarch/x86/kvm/ioapic.h arch/x86/kvm/lapic.c+11 -50 replies
9/9KVM: x86: Hide KVM_IRQCHIP_KERNEL behind CONFIG_KVM_IOAPIC=yarch/x86/include/asm/kvm_host.h+2 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] KVM: x86: APIC and I/O APIC cleanups

Drop a bunch of _really_ old dead code (ASSERT() buried behind a DEBUG macro that probably hasn't been enabled in 15+ years), clean up the bizarre and confusing "dest_map" pointer that gets passed all of the place but is only actually used for in-kernel RTC emulation, and the bury almost all of ioapic.h behind CONFIG_KVM_IOAPIC=y.

I'm not entirely sure why I started poking at this. I think I got mad at the dest_map code, and then things snowballed...

Sean Christopherson (9):
KVM: x86: Drop ASSERT()s on APIC/vCPU being non-NULL
KVM: x86: Drop guest/user-triggerable asserts on IRR/ISR vectors
KVM: x86: Drop ASSERT() on I/O APIC EOIs being only for LEVEL_to
WARN_ON_ONCE
KVM: x86: Drop guest-triggerable ASSERT()s on I/O APIC access
alignment
KVM: x86: Drop MAX_NR_RESERVED_IOAPIC_PINS, use KVM_MAX_IRQ_ROUTES
directly
KVM: x86: Add a wrapper to handle common case of IRQ delivery without
dest_map
KVM: x86: Fold "struct dest_map" into "struct rtc_status"
KVM: x86: Bury ioapic.h definitions behind CONFIG_KVM_IOAPIC
KVM: x86: Hide KVM_IRQCHIP_KERNEL behind CONFIG_KVM_IOAPIC=y

 arch/x86/include/asm/kvm_host.h |  2 +
 arch/x86/kvm/hyperv.c           |  2 +-
 arch/x86/kvm/ioapic.c           | 43 ++++++++-------------
 arch/x86/kvm/ioapic.h           | 38 ++++++-------------
 arch/x86/kvm/irq.c              |  4 +-
 arch/x86/kvm/lapic.c            | 66 ++++++++++++++++-----------------
 arch/x86/kvm/lapic.h            | 20 +++++++---
 arch/x86/kvm/x86.c              |  4 +-
 arch/x86/kvm/xen.c              |  2 +-
 9 files changed, 81 insertions(+), 100 deletions(-)

base-commit: 5d3e2d9ba9ed68576c70c127e4f7446d896f2af2

Signature · 1 line
2.52.0.223.gf5cc29aaa4-goog