aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/dirty_log_test.c
diff options
context:
space:
mode:
authorAndrew Jones <drjones@redhat.com>2018-09-18 19:54:35 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2018-10-17 00:29:38 +0200
commite28934e661c1d9425f1cc41b405dcd8626507206 (patch)
tree47348a4a17d92a7c361809a81ca6ec44de096d40 /tools/testing/selftests/kvm/dirty_log_test.c
parentkvm: selftests: dirty_log_test: also test 64K pages on aarch64 (diff)
downloadlinux-dev-e28934e661c1d9425f1cc41b405dcd8626507206.tar.xz
linux-dev-e28934e661c1d9425f1cc41b405dcd8626507206.zip
kvm: selftests: stop lying to aarch64 tests about PA-bits
Let's add the 40 PA-bit versions of the VM modes, that AArch64 should have been using, so we can extend the dirty log test without breaking things. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/dirty_log_test.c')
-rw-r--r--tools/testing/selftests/kvm/dirty_log_test.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/testing/selftests/kvm/dirty_log_test.c b/tools/testing/selftests/kvm/dirty_log_test.c
index 3afc7d607a2e..61396882ad4e 100644
--- a/tools/testing/selftests/kvm/dirty_log_test.c
+++ b/tools/testing/selftests/kvm/dirty_log_test.c
@@ -230,9 +230,11 @@ static void run_test(enum vm_guest_mode mode, unsigned long iterations,
switch (mode) {
case VM_MODE_P52V48_4K:
+ case VM_MODE_P40V48_4K:
guest_page_shift = 12;
break;
case VM_MODE_P52V48_64K:
+ case VM_MODE_P40V48_64K:
guest_page_shift = 16;
break;
default:
@@ -317,11 +319,16 @@ static struct vm_guest_modes {
bool supported;
bool enabled;
} vm_guest_modes[NUM_VM_MODES] = {
+#if defined(__x86_64__)
{ VM_MODE_P52V48_4K, 1, 1, },
-#ifdef __aarch64__
- { VM_MODE_P52V48_64K, 1, 1, },
-#else
{ VM_MODE_P52V48_64K, 0, 0, },
+ { VM_MODE_P40V48_4K, 0, 0, },
+ { VM_MODE_P40V48_64K, 0, 0, },
+#elif defined(__aarch64__)
+ { VM_MODE_P52V48_4K, 0, 0, },
+ { VM_MODE_P52V48_64K, 0, 0, },
+ { VM_MODE_P40V48_4K, 1, 1, },
+ { VM_MODE_P40V48_64K, 1, 1, },
#endif
};