]> www.infradead.org Git - linux.git/commit
KVM: arm64: vgic-debug: Use an xarray mark for debug iterator
authorOliver Upton <oliver.upton@linux.dev>
Mon, 22 Apr 2024 20:01:44 +0000 (20:01 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 25 Apr 2024 12:19:55 +0000 (13:19 +0100)
commit85d3ccc8b75bb5a443edb3c42fa22e97da2e60ec
tree1ae242b983b57d69e9116a95aca3da10e3084f40
parent11f4f8f3e6e0697fb640d5c6c79b27c2233bc3da
KVM: arm64: vgic-debug: Use an xarray mark for debug iterator

The vgic debug iterator is the final user of vgic_copy_lpi_list(), but
is a bit more complicated to transition to something else. Use a mark
in the LPI xarray to record the indices 'known' to the debug iterator.
Protect against the LPIs from being freed by associating an additional
reference with the xarray mark.

Rework iter_next() to let the xarray walk 'drive' the iteration after
visiting all of the SGIs, PPIs, and SPIs.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240422200158.2606761-6-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/vgic/vgic-debug.c
arch/arm64/kvm/vgic/vgic-its.c
arch/arm64/kvm/vgic/vgic.h
include/kvm/arm_vgic.h