]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.1/kvm-selftests-aarch64-fix-default-vm-mode.patch
move all the pending queues back to their "real" places
[thirdparty/kernel/stable-queue.git] / queue-5.1 / kvm-selftests-aarch64-fix-default-vm-mode.patch
1 From e2c681747631ed6a49ba0ca6eb3f07eeb705a0f9 Mon Sep 17 00:00:00 2001
2 From: Andrew Jones <drjones@redhat.com>
3 Date: Thu, 23 May 2019 13:05:46 +0200
4 Subject: kvm: selftests: aarch64: fix default vm mode
5
6 [ Upstream commit 55eda003f02f075bab0223a188e548dbf3ac8dfe ]
7
8 VM_MODE_P52V48_4K is not a valid mode for AArch64. Replace its
9 use in vm_create_default() with a mode that works and represents
10 a good AArch64 default. (We didn't ever see a problem with this
11 because we don't have any unit tests using vm_create_default(),
12 but it's good to get it fixed in advance.)
13
14 Reported-by: Thomas Huth <thuth@redhat.com>
15 Signed-off-by: Andrew Jones <drjones@redhat.com>
16 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
17 Signed-off-by: Sasha Levin <sashal@kernel.org>
18 ---
19 tools/testing/selftests/kvm/lib/aarch64/processor.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22 diff --git a/tools/testing/selftests/kvm/lib/aarch64/processor.c b/tools/testing/selftests/kvm/lib/aarch64/processor.c
23 index e8c42506a09d..fa6cd340137c 100644
24 --- a/tools/testing/selftests/kvm/lib/aarch64/processor.c
25 +++ b/tools/testing/selftests/kvm/lib/aarch64/processor.c
26 @@ -226,7 +226,7 @@ struct kvm_vm *vm_create_default(uint32_t vcpuid, uint64_t extra_mem_pages,
27 uint64_t extra_pg_pages = (extra_mem_pages / ptrs_per_4k_pte) * 2;
28 struct kvm_vm *vm;
29
30 - vm = vm_create(VM_MODE_P52V48_4K, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages, O_RDWR);
31 + vm = vm_create(VM_MODE_P40V48_4K, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages, O_RDWR);
32
33 kvm_vm_elf_load(vm, program_invocation_name, 0, 0);
34 vm_vcpu_add_default(vm, vcpuid, guest_code);
35 --
36 2.20.1
37