KVM: arm64: selftests: Make vgic_init gic version agnostic
authorRicardo Koller <ricarkol@google.com>
Tue, 5 Oct 2021 01:19:16 +0000 (18:19 -0700)
committerMarc Zyngier <maz@kernel.org>
Mon, 11 Oct 2021 08:31:42 +0000 (09:31 +0100)
commit3f4db37e203b0562d9ebae575af13ea159fbd077
tree33c9526f3d066326ad7ad2814e718b55ad55ce00
parent96e903896969679104c7fef2c776ed1b5b09584f
KVM: arm64: selftests: Make vgic_init gic version agnostic

As a preparation for the next commits which will add some tests for
GICv2, make aarch64/vgic_init GIC version agnostic. Add a new generic
run_tests function(gic_dev_type) that starts all applicable tests using
GICv3 or GICv2. GICv2 tests are attempted if GICv3 is not available in
the system. There are currently no GICv2 tests, but the test passes now
in GICv2 systems.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Ricardo Koller <ricarkol@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211005011921.437353-7-ricarkol@google.com
tools/testing/selftests/kvm/aarch64/vgic_init.c