Re: [PATCH] KVM: arm64: nv: Fix s_cpu_if->vgic_lr[] indexing in vgic_v3_put_nested()

From: Wei-Lin Chang
Date: Mon Jun 16 2025 - 10:38:48 EST


On Sun, Jun 15, 2025 at 10:55:20PM -0700, Oliver Upton wrote:
> On Sat, Jun 14, 2025 at 10:57:21PM +0800, Wei-Lin Chang wrote:
> > s_cpu_if->vgic_lr[] is filled continuously from index 0 to
> > s_cpu_if->used_lrs - 1, but vgic_v3_put_nested() is indexing it using
> > the positions of the set bits in shadow_if->lr_map. So correct it.
>
> The changelog is a bit too mechanical and doesn't actually add anything
> to the diff. Maybe:
>
> Shadow LRs may exist at different indices from the corresponding LRs
> in the guest hypervisor's vgic, as the shadow LRs are populated
> contiguously in vgic_v3_create_shadow_lr().
>
> Use the correct shadow LR index when forwarding vIRQ state back to the
> guest hypervisor's vgic in vgic_v3_put_nested().
>

Hi Oliver,

Although we're not taking this, I still appreciate your help on the
commit message.

Thanks,
Wei-Lin Chang

> Diff itself LGTM.
>
> Reviewed-by: Oliver Upton <oliver.upton@xxxxxxxxx>
>
> Thanks,
> Oliver