KVM: selftests: Align with kernel's GIC definitions
authorOliver Upton <oliver.upton@linux.dev>
Mon, 22 Apr 2024 20:01:52 +0000 (20:01 +0000)
committerMarc Zyngier <maz@kernel.org>
Thu, 25 Apr 2024 12:19:56 +0000 (13:19 +0100)
commitd82689bdd828833bd582c2bf7a85071cacb52990
tree8258315faeceeb3c9ce703a62e83b79565f5bc03
parent481c9ee846d27c72acc0c3bb23025c7fdad8c171
KVM: selftests: Align with kernel's GIC definitions

There are a few subtle incongruencies between the GIC definitions used
by the kernel and selftests. Furthermore, the selftests header blends
implementation detail (e.g. default priority) with the architectural
definitions.

This is all rather annoying, since bulk imports of the kernel header
is not possible. Move selftests-specific definitions out of the
offending header and realign tests on the canonical definitions for
things like sysregs. Finally, haul in a fresh copy of the gicv3 header
to enable a forthcoming ITS selftest.

Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Link: https://lore.kernel.org/r/20240422200158.2606761-14-oliver.upton@linux.dev
Signed-off-by: Marc Zyngier <maz@kernel.org>
tools/testing/selftests/kvm/aarch64/vgic_irq.c
tools/testing/selftests/kvm/include/aarch64/gic_v3.h
tools/testing/selftests/kvm/lib/aarch64/gic_v3.c