Skip to content

KVM: x86: Optimize "stale" EOI bitmap exiting

Sean Christopherson kvm lkml 1 version Applied

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

Get series with b4
b4 am [email protected]

Versions newest first

  1. v5 Latest3 patches 6 repliesApplied

Changes in v5 from the cover letter

- Intercept EOI if and only if the IRQ is level-triggered.
- Add helper to consolidate logic.
- Tweak field name.
- "Reset" field to -1, immediately before scanning routes.

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/3KVM: x86: Isolate edge vs. level check in userspace I/O APIC route scanningarch/x86/kvm/irq_comm.c+6 -43 replies
2/3KVM: x86: Add a helper to deduplicate I/O APIC EOI interception logicarch/x86/kvm/ioapic.c arch/x86/kvm/ioapic.h arch/x86/kvm/irq_comm.c+21 -91 reply
3/3KVM: x86: Rescan I/O APIC routes after EOI interception for old routingarch/x86/include/asm/kvm_host.h arch/x86/kvm/irq_comm.c arch/x86/kvm/lapic.c +1 more+24 -21 reply

Reviews trailers per patch

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

PatchKai Huang
1/3R-b
2/3R-b
3/3R-b

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

Read the v5 thread

Cover letter [PATCH v5 0/3] KVM: x86: Optimize "stale" EOI bitmap exiting

Slightly modified version of the patch (now mini-series) to optimize EOI bitmap exiting for "stale" routes, i.e. for the case where a vCPU has an in-flight IRQ when the routing changes, and needs one final EOI exit to deassert the IRQ.

Kai, I dropped your Reviewed-by as the change was non-trivial.

v5:
- Intercept EOI if and only if the IRQ is level-triggered.
- Add helper to consolidate logic.
- Tweak field name.
- "Reset" field to -1, immediately before scanning routes.

v4: https://lore.kernel.org/all/[email protected]

Sean Christopherson (2):
KVM: x86: Isolate edge vs. level check in userspace I/O APIC route
scanning
KVM: x86: Add a helper to deduplicate I/O APIC EOI interception logic

weizijie (1):
KVM: x86: Rescan I/O APIC routes after EOI interception for old
routing

 arch/x86/include/asm/kvm_host.h |  1 +
 arch/x86/kvm/ioapic.c           |  7 ++-----
 arch/x86/kvm/ioapic.h           |  2 ++
 arch/x86/kvm/irq_comm.c         | 37 ++++++++++++++++++++++++++++-----
 arch/x86/kvm/lapic.c            |  8 +++++++
 arch/x86/kvm/x86.c              |  1 +
 6 files changed, 46 insertions(+), 10 deletions(-)

base-commit: ead22377189e55ba0e9b637a8f48578cf84f5b9c

Signature · 1 line
2.48.1.711.g2feabab25a-goog