KVM: selftests: aarch64/vgic-v3 init sequence tests
authorEric Auger <eric.auger@redhat.com>
Mon, 5 Apr 2021 16:39:41 +0000 (18:39 +0200)
committerMarc Zyngier <maz@kernel.org>
Tue, 6 Apr 2021 13:52:31 +0000 (14:52 +0100)
commitdc0e058eef42f61effe9fd4f0fa4b0c793cc1f14
tree0aac21c24dde4b9fea78269db327506be8cb414b
parent28e9d4bce3be9b8fec6c854f87923db99c8fb874
KVM: selftests: aarch64/vgic-v3 init sequence tests

The tests exercise the VGIC_V3 device creation including the
associated KVM_DEV_ARM_VGIC_GRP_ADDR group attributes:

- KVM_VGIC_V3_ADDR_TYPE_DIST/REDIST
- KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION

Some other tests dedicate to KVM_DEV_ARM_VGIC_GRP_REDIST_REGS group
and especially the GICR_TYPER read. The goal was to test the case
recently fixed by commit 23bde34771f1
("KVM: arm64: vgic-v3: Drop the reporting of GICR_TYPER.Last for userspace").

The API under test can be found at
Documentation/virt/kvm/devices/arm-vgic-v3.rst

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210405163941.510258-10-eric.auger@redhat.com
tools/testing/selftests/kvm/.gitignore
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/aarch64/vgic_init.c [new file with mode: 0644]
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/kvm_util.c