Skip to content

Commit 2240a50

Browse files
Zenghui Yuoupton
authored andcommitted
KVM: arm64: vgic-debug: Don't put unmarked LPIs
If there were LPIs being mapped behind our back (i.e., between .start() and .stop()), we would put them at iter_unmark_lpis() without checking if they were actually *marked*, which is obviously not good. Switch to use the xa_for_each_marked() iterator to fix it. Cc: [email protected] Fixes: 85d3ccc ("KVM: arm64: vgic-debug: Use an xarray mark for debug iterator") Signed-off-by: Zenghui Yu <[email protected]> Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 9eb1813 commit 2240a50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kvm/vgic/vgic-debug.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static void iter_unmark_lpis(struct kvm *kvm)
8585
struct vgic_irq *irq;
8686
unsigned long intid;
8787

88-
xa_for_each(&dist->lpi_xa, intid, irq) {
88+
xa_for_each_marked(&dist->lpi_xa, intid, irq, LPI_XA_MARK_DEBUG_ITER) {
8989
xa_clear_mark(&dist->lpi_xa, intid, LPI_XA_MARK_DEBUG_ITER);
9090
vgic_put_irq(kvm, irq);
9191
}

0 commit comments

Comments
 (0)