diff options
author | Raghavendra Rao Ananta <rananta@google.com> | 2021-10-07 23:34:37 +0000 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-10-17 11:17:21 +0100 |
commit | 250b8d6cb3b0312341304fa323b82355d656c018 (patch) | |
tree | fdc6718e0791d4d318a4ea9388eda84aa8c30be2 /tools/testing/selftests/kvm/aarch64/vgic_init.c | |
parent | 28281652f90acc138f8b4bae8a3bf8cf1ce0d29e (diff) |
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
Diffstat (limited to 'tools/testing/selftests/kvm/aarch64/vgic_init.c')
-rw-r--r-- | tools/testing/selftests/kvm/aarch64/vgic_init.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/vgic_init.c b/tools/testing/selftests/kvm/aarch64/vgic_init.c index 623f31a14326..157fc24f39c5 100644 --- a/tools/testing/selftests/kvm/aarch64/vgic_init.c +++ b/tools/testing/selftests/kvm/aarch64/vgic_init.c @@ -13,11 +13,10 @@ #include "test_util.h" #include "kvm_util.h" #include "processor.h" +#include "vgic.h" #define NR_VCPUS 4 -#define REDIST_REGION_ATTR_ADDR(count, base, flags, index) (((uint64_t)(count) << 52) | \ - ((uint64_t)((base) >> 16) << 16) | ((uint64_t)(flags) << 12) | index) #define REG_OFFSET(vcpu, offset) (((uint64_t)vcpu << 32) | offset) #define GICR_TYPER 0x8 |