mbox series

[v3,00/19] KVM: arm64: Transition to a per-ITS translation cache

Message ID 20240422200158.2606761-1-oliver.upton@linux.dev (mailing list archive)
Headers show
Series KVM: arm64: Transition to a per-ITS translation cache | expand

Message

Oliver Upton April 22, 2024, 8:01 p.m. UTC
v2: https://lore.kernel.org/kvmarm/20240419223842.951452-1-oliver.upton@linux.dev/

v2 -> v3:
 - Add lockdep assertion to kvm_vfio_create() (Sean)
 - Address intermediate compilation issue in vgic_its_invalidate_cache()
   (Marc)
 - Use a more compact cache index based on the DID/EID range of the ITS
   (Marc)
 - Comment improvements (Marc)
 - Avoid explicit acquisition of the translation cache's xa_lock()
   (Marc)
 - Eliminate the need to disable IRQs to acquire the translation cache's
   xa_lock()
 - Collapse internal helper into vgic_its_check_cache()


Oliver Upton (19):
  KVM: Treat the device list as an rculist
  KVM: arm64: vgic-its: Walk LPI xarray in its_sync_lpi_pending_table()
  KVM: arm64: vgic-its: Walk LPI xarray in vgic_its_invall()
  KVM: arm64: vgic-its: Walk LPI xarray in vgic_its_cmd_handle_movall()
  KVM: arm64: vgic-debug: Use an xarray mark for debug iterator
  KVM: arm64: vgic-its: Get rid of vgic_copy_lpi_list()
  KVM: arm64: vgic-its: Scope translation cache invalidations to an ITS
  KVM: arm64: vgic-its: Maintain a translation cache per ITS
  KVM: arm64: vgic-its: Spin off helper for finding ITS by doorbell addr
  KVM: arm64: vgic-its: Use the per-ITS translation cache for injection
  KVM: arm64: vgic-its: Rip out the global translation cache
  KVM: arm64: vgic-its: Get rid of the lpi_list_lock
  KVM: selftests: Align with kernel's GIC definitions
  KVM: selftests: Standardise layout of GIC frames
  KVM: selftests: Add quadword MMIO accessors
  KVM: selftests: Add a minimal library for interacting with an ITS
  KVM: selftests: Add helper for enabling LPIs on a redistributor
  KVM: selftests: Use MPIDR_HWID_BITMASK from cputype.h
  KVM: selftests: Add stress test for LPI injection

 arch/arm64/kvm/vgic/vgic-debug.c              |  82 ++-
 arch/arm64/kvm/vgic/vgic-init.c               |   8 -
 arch/arm64/kvm/vgic/vgic-its.c                | 352 ++++-------
 arch/arm64/kvm/vgic/vgic-mmio-v3.c            |   2 +-
 arch/arm64/kvm/vgic/vgic.c                    |   6 +-
 arch/arm64/kvm/vgic/vgic.h                    |   6 +-
 include/kvm/arm_vgic.h                        |  13 +-
 tools/testing/selftests/kvm/Makefile          |   2 +
 .../selftests/kvm/aarch64/arch_timer.c        |   8 +-
 .../testing/selftests/kvm/aarch64/psci_test.c |   2 +
 .../testing/selftests/kvm/aarch64/vgic_irq.c  |  15 +-
 .../selftests/kvm/aarch64/vgic_lpi_stress.c   | 410 ++++++++++++
 .../kvm/aarch64/vpmu_counter_access.c         |   6 +-
 .../selftests/kvm/dirty_log_perf_test.c       |   5 +-
 .../selftests/kvm/include/aarch64/gic.h       |  21 +-
 .../selftests/kvm/include/aarch64/gic_v3.h    | 586 +++++++++++++++++-
 .../kvm/include/aarch64/gic_v3_its.h          |  19 +
 .../selftests/kvm/include/aarch64/processor.h |  19 +-
 .../selftests/kvm/include/aarch64/vgic.h      |   5 +-
 tools/testing/selftests/kvm/lib/aarch64/gic.c |  18 +-
 .../selftests/kvm/lib/aarch64/gic_private.h   |   4 +-
 .../selftests/kvm/lib/aarch64/gic_v3.c        |  99 +--
 .../selftests/kvm/lib/aarch64/gic_v3_its.c    | 248 ++++++++
 .../testing/selftests/kvm/lib/aarch64/vgic.c  |  38 +-
 virt/kvm/kvm_main.c                           |  14 +-
 virt/kvm/vfio.c                               |   2 +
 26 files changed, 1572 insertions(+), 418 deletions(-)
 create mode 100644 tools/testing/selftests/kvm/aarch64/vgic_lpi_stress.c
 create mode 100644 tools/testing/selftests/kvm/include/aarch64/gic_v3_its.h
 create mode 100644 tools/testing/selftests/kvm/lib/aarch64/gic_v3_its.c


base-commit: fec50db7033ea478773b159e0e2efb135270e3b7

Comments

Marc Zyngier April 25, 2024, 12:33 p.m. UTC | #1
On Mon, 22 Apr 2024 20:01:39 +0000, Oliver Upton wrote:
> v2: https://lore.kernel.org/kvmarm/20240419223842.951452-1-oliver.upton@linux.dev/
> 
> v2 -> v3:
>  - Add lockdep assertion to kvm_vfio_create() (Sean)
>  - Address intermediate compilation issue in vgic_its_invalidate_cache()
>    (Marc)
>  - Use a more compact cache index based on the DID/EID range of the ITS
>    (Marc)
>  - Comment improvements (Marc)
>  - Avoid explicit acquisition of the translation cache's xa_lock()
>    (Marc)
>  - Eliminate the need to disable IRQs to acquire the translation cache's
>    xa_lock()
>  - Collapse internal helper into vgic_its_check_cache()
> 
> [...]

Applied to next, thanks!

[01/19] KVM: Treat the device list as an rculist
        commit: ea54dd374232cc3b6d0ac0a89d715d61ebb04bf6
[02/19] KVM: arm64: vgic-its: Walk LPI xarray in its_sync_lpi_pending_table()
        commit: 720f73b750e66ca753c56c29801009c28bb484ac
[03/19] KVM: arm64: vgic-its: Walk LPI xarray in vgic_its_invall()
        commit: c64115c80fc8abacfb89c36d650b7021ebb3d739
[04/19] KVM: arm64: vgic-its: Walk LPI xarray in vgic_its_cmd_handle_movall()
        commit: 11f4f8f3e6e0697fb640d5c6c79b27c2233bc3da
[05/19] KVM: arm64: vgic-debug: Use an xarray mark for debug iterator
        commit: 85d3ccc8b75bb5a443edb3c42fa22e97da2e60ec
[06/19] KVM: arm64: vgic-its: Get rid of vgic_copy_lpi_list()
        commit: 30a0ce9c4928640efd3112d01d432d0778878b7e
[07/19] KVM: arm64: vgic-its: Scope translation cache invalidations to an ITS
        commit: c09c8ab99a8afb24f6b4a6bc7c2767fec348ae81
[08/19] KVM: arm64: vgic-its: Maintain a translation cache per ITS
        commit: 8201d1028caa4fae88e222c4e8cf541fdf45b821
[09/19] KVM: arm64: vgic-its: Spin off helper for finding ITS by doorbell addr
        commit: dedfcd17faf8718f4842e7fbfcd2e7026854d7f5
[10/19] KVM: arm64: vgic-its: Use the per-ITS translation cache for injection
        commit: e64f2918c6e7a2c2cbf310d1b571d1a886b91475
[11/19] KVM: arm64: vgic-its: Rip out the global translation cache
        commit: ec39bbfd55d07de2e2d4111f35c7ad9523c89ec3
[12/19] KVM: arm64: vgic-its: Get rid of the lpi_list_lock
        commit: 481c9ee846d27c72acc0c3bb23025c7fdad8c171
[13/19] KVM: selftests: Align with kernel's GIC definitions
        commit: d82689bdd828833bd582c2bf7a85071cacb52990
[14/19] KVM: selftests: Standardise layout of GIC frames
        commit: 1505bc70f80df9824e9d68d15a7452856df7488c
[15/19] KVM: selftests: Add quadword MMIO accessors
        commit: 232269eb7dd5242877abfab1d47a1eb049a44b95
[16/19] KVM: selftests: Add a minimal library for interacting with an ITS
        commit: be26db61e880b3892f189e9ef54b7b80599245bf
[17/19] KVM: selftests: Add helper for enabling LPIs on a redistributor
        commit: 03e560ab539009856266b0cf8c100c9f7d1f8fee
[18/19] KVM: selftests: Use MPIDR_HWID_BITMASK from cputype.h
        commit: c3c369b508d9a447436b7abb2fded9aec18953ff
[19/19] KVM: selftests: Add stress test for LPI injection
        commit: 96d36ad95b03c89857d405b3317efb0188ac59cb

Cheers,

	M.