Commit 49f0a468 authored by Oliver Upton's avatar Oliver Upton

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: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240221054253.3848076-4-oliver.upton@linux.devSigned-off-by: default avatarOliver Upton <oliver.upton@linux.dev>
parent 5a021df7
...@@ -380,6 +380,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm) ...@@ -380,6 +380,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
struct vgic_irq *irq; struct vgic_irq *irq;
gpa_t last_ptr = ~(gpa_t)0; gpa_t last_ptr = ~(gpa_t)0;
bool vlpi_avail = false; bool vlpi_avail = false;
unsigned long index;
int ret = 0; int ret = 0;
u8 val; u8 val;
...@@ -396,7 +397,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm) ...@@ -396,7 +397,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
vlpi_avail = true; vlpi_avail = true;
} }
list_for_each_entry(irq, &dist->lpi_list_head, lpi_list) { xa_for_each(&dist->lpi_xa, index, irq) {
int byte_offset, bit_nr; int byte_offset, bit_nr;
struct kvm_vcpu *vcpu; struct kvm_vcpu *vcpu;
gpa_t pendbase, ptr; gpa_t pendbase, ptr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment