lkml.org 
[lkml]   [2024]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 03/10] KVM: arm64: vgic-v3: Iterate the xarray to find pending LPIs
    Date
    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.

    Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
    ---
    arch/arm64/kvm/vgic/vgic-v3.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/arch/arm64/kvm/vgic/vgic-v3.c b/arch/arm64/kvm/vgic/vgic-v3.c
    index 9465d3706ab9..4ea3340786b9 100644
    --- a/arch/arm64/kvm/vgic/vgic-v3.c
    +++ b/arch/arm64/kvm/vgic/vgic-v3.c
    @@ -380,6 +380,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
    struct vgic_irq *irq;
    gpa_t last_ptr = ~(gpa_t)0;
    bool vlpi_avail = false;
    + unsigned long index;
    int ret = 0;
    u8 val;

    @@ -396,7 +397,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
    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;
    struct kvm_vcpu *vcpu;
    gpa_t pendbase, ptr;
    --
    2.44.0.rc0.258.g7320e95886-goog

    \
     
     \ /
      Last update: 2024-05-27 15:14    [W:2.799 / U:0.068 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site