]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up kvm patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jun 2024 13:02:01 +0000 (15:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Jun 2024 13:02:01 +0000 (15:02 +0200)
queue-6.1/kvm-selftests-add-test-for-uaccesses-to-non-existent.patch
queue-6.6/kvm-selftests-add-test-for-uaccesses-to-non-existent.patch

index 07f52d9239a46551ed78f070133b50ac63931d99..952283821017124ba50db60b7ceb2365494e4646 100644 (file)
@@ -20,14 +20,20 @@ Link: https://lore.kernel.org/r/20240424173959.3776798-3-oliver.upton@linux.dev
 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;
  }
  
@@ -46,7 +52,7 @@ index 9c131d977a1b5..ef737d0ed8fcb 100644
  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);
  }
  
@@ -87,7 +93,7 @@ index 9c131d977a1b5..ef737d0ed8fcb 100644
  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);
  
@@ -97,6 +103,3 @@ index 9c131d977a1b5..ef737d0ed8fcb 100644
        if (VGIC_DEV_IS_V3(gic_dev_type)) {
                test_v3_new_redist_regions();
                test_v3_typer_accesses();
--- 
-2.43.0
-
index d16919ef2babc520670aaae92e88628e43d4bf60..fbc1b277ddd92956e498e5e06691994caf111a0d 100644 (file)
@@ -20,14 +20,20 @@ Link: https://lore.kernel.org/r/20240424173959.3776798-3-oliver.upton@linux.dev
 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;
  }
  
@@ -46,7 +52,7 @@ index eef816b80993f..ca917c71ff602 100644
  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);
  }
  
@@ -87,7 +93,7 @@ index eef816b80993f..ca917c71ff602 100644
  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);
  
@@ -97,6 +103,3 @@ index eef816b80993f..ca917c71ff602 100644
        if (VGIC_DEV_IS_V3(gic_dev_type)) {
                test_v3_new_redist_regions();
                test_v3_typer_accesses();
--- 
-2.43.0
-