Re: [PATCH 02/13] KVM: arm64: selftests: Initialize VGICv3 only once

Zenghui Yu
2025-09-18T10:44:44Z

On 2025/9/18 5:20, Oliver Upton wrote:
> vgic_v3_setup() unnecessarily initializes the vgic twice. Keep the
> initialization after configuring MMIO frames and get rid of the other.
>
> Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
> ---
> tools/testing/selftests/kvm/lib/arm64/vgic.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/lib/arm64/vgic.c b/tools/testing/selftests/kvm/lib/arm64/vgic.c
> index 4427f43f73ea..64e793795563 100644
> --- a/tools/testing/selftests/kvm/lib/arm64/vgic.c
> +++ b/tools/testing/selftests/kvm/lib/arm64/vgic.c
> @@ -56,9 +56,6 @@ int vgic_v3_setup(struct kvm_vm *vm, unsigned int nr_vcpus, uint32_t nr_irqs)
>
> kvm_device_attr_set(gic_fd, KVM_DEV_ARM_VGIC_GRP_NR_IRQS, 0, &nr_irqs);
>
> - kvm_device_attr_set(gic_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
> - KVM_DEV_ARM_VGIC_CTRL_INIT, NULL);
> -

.. which was added by commit e5410ee2806d ("KVM: selftests: aarch64:
Cmdline arg to set number of IRQs in vgic_irq test").

> attr = GICD_BASE_GPA;
> kvm_device_attr_set(gic_fd, KVM_DEV_ARM_VGIC_GRP_ADDR,
> KVM_VGIC_V3_ADDR_TYPE_DIST, &attr);

Reviewed-by: Zenghui Yu <yuzenghui@huawei.com>

Thanks,
Zenghui