KVM: arm64: selftests: Add tests for GIC redist/cpuif partially above IPA range
authorRicardo Koller <ricarkol@google.com>
Tue, 5 Oct 2021 01:19:19 +0000 (18:19 -0700)
committerMarc Zyngier <maz@kernel.org>
Mon, 11 Oct 2021 08:31:42 +0000 (09:31 +0100)
commit2dcd9aa1c3a5d3c90047d67efd08f0518f915449
treeb651bf10f45ad118616caff968f16bd0280f185a
parentc44df5f9ff31daaa72b3a673422d5cca03a1fd02
KVM: arm64: selftests: Add tests for GIC redist/cpuif partially above IPA range

Add tests for checking that KVM returns the right error when trying to
set GICv2 CPU interfaces or GICv3 Redistributors partially above the
addressable IPA range. Also tighten the IPA range by replacing
KVM_CAP_ARM_VM_IPA_SIZE with the IPA range currently configured for the
guest (i.e., the default).

The check for the GICv3 redistributor created using the REDIST legacy
API is not sufficient as this new test only checks the check done using
vcpus already created when setting the base. The next commit will add
the missing test which verifies that the KVM check is done at first vcpu
run.

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