Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- .../testing/selftests/kvm/aarch64/vgic_init.c | 49 +++++++++++++++++++
- 1 file changed, 49 insertions(+)
+ tools/testing/selftests/kvm/aarch64/vgic_init.c | 50 ++++++++++++++++++++++++
+ 1 file changed, 50 insertions(+)
-diff --git a/tools/testing/selftests/kvm/aarch64/vgic_init.c b/tools/testing/selftests/kvm/aarch64/vgic_init.c
-index 9c131d977a1b5..ef737d0ed8fcb 100644
--- a/tools/testing/selftests/kvm/aarch64/vgic_init.c
+++ b/tools/testing/selftests/kvm/aarch64/vgic_init.c
-@@ -86,6 +86,18 @@ static struct vm_gic vm_gic_create_with_vcpus(uint32_t gic_dev_type,
+@@ -6,6 +6,7 @@
+ */
+ #define _GNU_SOURCE
+ #include <linux/kernel.h>
++#include <linux/bitfield.h>
+ #include <sys/syscall.h>
+ #include <asm/kvm.h>
+ #include <asm/kvm_para.h>
+@@ -86,6 +87,18 @@ static struct vm_gic vm_gic_create_with_
return v;
}
static void vm_gic_destroy(struct vm_gic *v)
{
close(v->gic_fd);
-@@ -359,6 +371,40 @@ static void test_vcpus_then_vgic(uint32_t gic_dev_type)
+@@ -359,6 +372,40 @@ static void test_vcpus_then_vgic(uint32_
vm_gic_destroy(&v);
}
static void test_v3_new_redist_regions(void)
{
struct kvm_vcpu *vcpus[NR_VCPUS];
-@@ -677,6 +723,9 @@ void run_tests(uint32_t gic_dev_type)
+@@ -677,6 +724,9 @@ void run_tests(uint32_t gic_dev_type)
test_vcpus_then_vgic(gic_dev_type);
test_vgic_then_vcpus(gic_dev_type);
if (VGIC_DEV_IS_V3(gic_dev_type)) {
test_v3_new_redist_regions();
test_v3_typer_accesses();
---
-2.43.0
-
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
- .../testing/selftests/kvm/aarch64/vgic_init.c | 49 +++++++++++++++++++
- 1 file changed, 49 insertions(+)
+ tools/testing/selftests/kvm/aarch64/vgic_init.c | 50 ++++++++++++++++++++++++
+ 1 file changed, 50 insertions(+)
-diff --git a/tools/testing/selftests/kvm/aarch64/vgic_init.c b/tools/testing/selftests/kvm/aarch64/vgic_init.c
-index eef816b80993f..ca917c71ff602 100644
--- a/tools/testing/selftests/kvm/aarch64/vgic_init.c
+++ b/tools/testing/selftests/kvm/aarch64/vgic_init.c
-@@ -84,6 +84,18 @@ static struct vm_gic vm_gic_create_with_vcpus(uint32_t gic_dev_type,
+@@ -6,6 +6,7 @@
+ */
+ #define _GNU_SOURCE
+ #include <linux/kernel.h>
++#include <linux/bitfield.h>
+ #include <sys/syscall.h>
+ #include <asm/kvm.h>
+ #include <asm/kvm_para.h>
+@@ -84,6 +85,18 @@ static struct vm_gic vm_gic_create_with_
return v;
}
static void vm_gic_destroy(struct vm_gic *v)
{
close(v->gic_fd);
-@@ -357,6 +369,40 @@ static void test_vcpus_then_vgic(uint32_t gic_dev_type)
+@@ -357,6 +370,40 @@ static void test_vcpus_then_vgic(uint32_
vm_gic_destroy(&v);
}
static void test_v3_new_redist_regions(void)
{
struct kvm_vcpu *vcpus[NR_VCPUS];
-@@ -675,6 +721,9 @@ void run_tests(uint32_t gic_dev_type)
+@@ -675,6 +722,9 @@ void run_tests(uint32_t gic_dev_type)
test_vcpus_then_vgic(gic_dev_type);
test_vgic_then_vcpus(gic_dev_type);
if (VGIC_DEV_IS_V3(gic_dev_type)) {
test_v3_new_redist_regions();
test_v3_typer_accesses();
---
-2.43.0
-