Skip to content

KVM: arm64: Avoid serializing LPI get() / put()

Oliver Upton kvm kvmarm lkml 4 versions – Applied

Status from this message: Applied to kvmarm/next, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest10 patches 2 repliesApplied
  2. v310 patches 11 repliesSuperseded
  3. v223 patches 17 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v115 patches13 repliesSuperseded

Changes in v4 from the cover letter

- Actually walk the LPI INTID range in vgic_copy_lpi_list() (Zenghui)
- Ensure xa_lock is taken w/ IRQs disabled, even after purging usage of the lpi_list_lock (Zenghui)
- Document the lock ordering (Marc)

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/10KVM: arm64: vgic: Store LPIs in an xarrayarch/arm64/kvm/vgic/vgic-init.c arch/arm64/kvm/vgic/vgic-its.c arch/arm64/kvm/vgic/vgic.c +1 more+24 -10 replies
2/10KVM: arm64: vgic: Use xarray to find LPI in vgic_get_lpi()arch/arm64/kvm/vgic/vgic.c+5 -140 replies
3/10KVM: arm64: vgic-v3: Iterate the xarray to find pending LPIsarch/arm64/kvm/vgic/vgic-v3.c+2 -10 replies
4/10KVM: arm64: vgic-its: Walk the LPI xarray in vgic_copy_lpi_list()arch/arm64/kvm/vgic/vgic-its.c+8 -10 replies
5/10KVM: arm64: vgic: Get rid of the LPI linked-listarch/arm64/kvm/vgic/vgic-init.c arch/arm64/kvm/vgic/vgic-its.c arch/arm64/kvm/vgic/vgic.c +1 more+2 -100 replies
6/10KVM: arm64: vgic: Use atomics to count LPIsarch/arm64/kvm/vgic/vgic-debug.c arch/arm64/kvm/vgic/vgic-its.c arch/arm64/kvm/vgic/vgic.c +1 more+6 -60 replies
7/10KVM: arm64: vgic: Free LPI vgic_irq structs in an RCU-safe mannerarch/arm64/kvm/vgic/vgic.c include/kvm/arm_vgic.h+2 -10 replies
8/10KVM: arm64: vgic: Rely on RCU protection in vgic_get_lpi()arch/arm64/kvm/vgic/vgic.c arch/arm64/kvm/vgic/vgic.h+15 -80 replies
9/10KVM: arm64: vgic: Ensure the irq refcount is nonzero when taking a refarch/arm64/kvm/vgic/vgic-its.c arch/arm64/kvm/vgic/vgic.c+10 -110 replies
10/10KVM: arm64: vgic: Don't acquire the lpi_list_lock in vgic_put_irq()arch/arm64/kvm/vgic/vgic-its.c arch/arm64/kvm/vgic/vgic.c arch/arm64/kvm/vgic/vgic.h+11 -220 replies

Reviews trailers per patch

None of the 10 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMarc Zyngier
SeriesR-b
1/10
2/10
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

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

Read the v4 thread

Cover letter [PATCH v4 00/10] KVM: arm64: Avoid serializing LPI get() / put()

Addressing a few more goofs that Zenghui was kind enough to point out. Clearly all of the bugs have been found and addressed at this point.

v2: https://lore.kernel.org/kvmarm/[email protected]/
v3: https://lore.kernel.org/kvmarm/[email protected]/

v3 -> v4:
- Actually walk the LPI INTID range in vgic_copy_lpi_list() (Zenghui)
- Ensure xa_lock is taken w/ IRQs disabled, even after purging usage of the lpi_list_lock (Zenghui)
- Document the lock ordering (Marc)

Oliver Upton (10):
KVM: arm64: vgic: Store LPIs in an xarray
KVM: arm64: vgic: Use xarray to find LPI in vgic_get_lpi()
KVM: arm64: vgic-v3: Iterate the xarray to find pending LPIs
KVM: arm64: vgic-its: Walk the LPI xarray in vgic_copy_lpi_list()
KVM: arm64: vgic: Get rid of the LPI linked-list
KVM: arm64: vgic: Use atomics to count LPIs
KVM: arm64: vgic: Free LPI vgic_irq structs in an RCU-safe manner
KVM: arm64: vgic: Rely on RCU protection in vgic_get_lpi()
KVM: arm64: vgic: Ensure the irq refcount is nonzero when taking a ref
KVM: arm64: vgic: Don't acquire the lpi_list_lock in vgic_put_irq()

 arch/arm64/kvm/vgic/vgic-debug.c |  2 +-
 arch/arm64/kvm/vgic/vgic-init.c  |  4 ++-
 arch/arm64/kvm/vgic/vgic-its.c   | 55 +++++++++++++++++++----------
 arch/arm64/kvm/vgic/vgic-v3.c    |  3 +-
 arch/arm64/kvm/vgic/vgic.c       | 60 +++++++++++---------------------
 arch/arm64/kvm/vgic/vgic.h       | 15 +++++---
 include/kvm/arm_vgic.h           |  9 ++---
 7 files changed, 79 insertions(+), 69 deletions(-)

base-commit: 6613476e225e090cc9aad49be7fa504e290dd33d

Signature · 1 line
2.44.0.rc0.258.g7320e95886-goog