Skip to content

x86/irq: KVM: Optimize KVM's PIR harvesting

Sean Christopherson kvm lkml 2 versions – Applied

Status from this message: Applied to kvm-x86 pir.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 1 replyApplied
  2. v18 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Collect a review. [tglx]
- Use an "unsigned long" with a bitwise-OR to gather PIR. [tglx]

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/8x86/irq: Ensure initial PIR loads are performed exactly oncearch/x86/kernel/irq.c+1 -10 replies
2/8x86/irq: Track if IRQ was found in PIR during initial loop (to load PIR vals)arch/x86/kernel/irq.c+10 -90 replies
3/8KVM: VMX: Ensure vIRR isn't reloaded at odd times when sync'ing PIRarch/x86/kvm/lapic.c+1 -10 replies
4/8x86/irq: KVM: Track PIR bitmap as an "unsigned long" arrayarch/x86/include/asm/posted_intr.h arch/x86/kernel/irq.c arch/x86/kvm/lapic.c +2 more+21 -200 replies
5/8KVM: VMX: Process PIR using 64-bit accesses on 64-bit kernelsarch/x86/kvm/lapic.c+13 -70 replies
6/8KVM: VMX: Isolate pure loads from atomic XCHG when processing PIRarch/x86/kvm/lapic.c+8 -10 replies
7/8KVM: VMX: Use arch_xchg() when processing PIR to avoid instrumentationarch/x86/kvm/lapic.c+1 -10 replies
8/8x86/irq: KVM: Add helper for harvesting PIR to deduplicate KVM and posted MSIsarch/x86/include/asm/posted_intr.h arch/x86/kernel/irq.c arch/x86/kvm/lapic.c+69 -610 replies

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by.

PatchThomas Gleixner
1/8R-b
2/8
3/8
4/8
5/8
6/8
7/8
8/8

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 0/8] x86/irq: KVM: Optimize KVM's PIR harvesting

Optimizing KVM's PIR harvesting using the same techniques as posted MSIs, most notably to use 8-byte accesses on 64-bit kernels (/facepalm).

Fix a few warts along the way, and finish up by adding a helper to dedup the PIR harvesting code between KVM and posted MSIs.

v2:
- Collect a review. [tglx]
- Use an "unsigned long" with a bitwise-OR to gather PIR. [tglx]

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

Sean Christopherson (8):
x86/irq: Ensure initial PIR loads are performed exactly once x86/irq: Track if IRQ was found in PIR during initial loop (to load
PIR vals)
KVM: VMX: Ensure vIRR isn't reloaded at odd times when sync'ing PIR x86/irq: KVM: Track PIR bitmap as an "unsigned long" array
KVM: VMX: Process PIR using 64-bit accesses on 64-bit kernels
KVM: VMX: Isolate pure loads from atomic XCHG when processing PIR
KVM: VMX: Use arch_xchg() when processing PIR to avoid instrumentation x86/irq: KVM: Add helper for harvesting PIR to deduplicate KVM and
posted MSIs

 arch/x86/include/asm/posted_intr.h | 78 +++++++++++++++++++++++++++---
 arch/x86/kernel/irq.c              | 63 ++++--------------------
 arch/x86/kvm/lapic.c               | 20 ++++----
 arch/x86/kvm/lapic.h               |  4 +-
 arch/x86/kvm/vmx/posted_intr.h     |  2 +-
 5 files changed, 95 insertions(+), 72 deletions(-)

base-commit: 782f9feaa9517caf33186dcdd6b50a8f770ed29b

Signature · 1 line
2.49.0.472.ge94155a9ec-goog