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

Sean Christopherson posted 3 patches 11 months, 1 week ago
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(-)
[PATCH v5 0/3] KVM: x86: Optimize "stale" EOI bitmap exiting
Posted by Sean Christopherson 11 months, 1 week ago
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/20250303052227.523411-1-zijie.wei@linux.alibaba.com

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
-- 
2.48.1.711.g2feabab25a-goog
Re: [PATCH v5 0/3] KVM: x86: Optimize "stale" EOI bitmap exiting
Posted by Sean Christopherson 9 months, 2 weeks ago
On Mon, 03 Mar 2025 17:33:32 -0800, Sean Christopherson wrote:
> 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.
> 
> [...]

Applied to kvm-x86 misc, thanks!

[1/3] KVM: x86: Isolate edge vs. level check in userspace I/O APIC route scanning
      commit: b1f7723a5a5b018f4bc3fb8e234510be7c44ad00
[2/3] KVM: x86: Add a helper to deduplicate I/O APIC EOI interception logic
      commit: c2207bbc0c0f4b6ae8dbb73ec26e17aa0c45a3ca
[3/3] KVM: x86: Rescan I/O APIC routes after EOI interception for old routing
      commit: 87e4951e250bbccac47a8822f6f023a1de8b96ec

--
https://github.com/kvm-x86/linux/tree/next