Skip to content

Commit 49f0a46

Browse files
committed
KVM: arm64: vgic-v3: Iterate the xarray to find pending LPIs
Start walking the LPI xarray to find pending LPIs in preparation for the removal of the LPI linked-list. Note that the 'basic' iterator is chosen here as each iteration needs to drop the xarray read lock (RCU) as reads/writes to guest memory can potentially block. Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 5a021df commit 49f0a46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
380380
struct vgic_irq *irq;
381381
gpa_t last_ptr = ~(gpa_t)0;
382382
bool vlpi_avail = false;
383+
unsigned long index;
383384
int ret = 0;
384385
u8 val;
385386

@@ -396,7 +397,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
396397
vlpi_avail = true;
397398
}
398399

399-
list_for_each_entry(irq, &dist->lpi_list_head, lpi_list) {
400+
xa_for_each(&dist->lpi_xa, index, irq) {
400401
int byte_offset, bit_nr;
401402
struct kvm_vcpu *vcpu;
402403
gpa_t pendbase, ptr;

0 commit comments

Comments
 (0)