KVM: arm64: selftests: Add host support for vGIC
authorRaghavendra Rao Ananta <rananta@google.com>
Thu, 7 Oct 2021 23:34:37 +0000 (23:34 +0000)
committerMarc Zyngier <maz@kernel.org>
Sun, 17 Oct 2021 10:17:21 +0000 (11:17 +0100)
commit250b8d6cb3b0312341304fa323b82355d656c018
treefdc6718e0791d4d318a4ea9388eda84aa8c30be2
parent28281652f90acc138f8b4bae8a3bf8cf1ce0d29e
KVM: arm64: selftests: Add host support for vGIC

Implement a simple library to perform vGIC-v3 setup
from a host point of view. This includes creating a
vGIC device, setting up distributor and redistributor
attributes, and mapping the guest physical addresses.

The definition of REDIST_REGION_ATTR_ADDR is taken from
aarch64/vgic_init test. Hence, replace the definition
by including vgic.h in the test file.

Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Reviewed-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/20211007233439.1826892-14-rananta@google.com
tools/testing/selftests/kvm/Makefile
tools/testing/selftests/kvm/aarch64/vgic_init.c
tools/testing/selftests/kvm/include/aarch64/vgic.h [new file with mode: 0644]
tools/testing/selftests/kvm/lib/aarch64/vgic.c [new file with mode: 0644]