Skip to content

Commit

Permalink
kvm: selftests: aarch64: fix default vm mode
Browse files Browse the repository at this point in the history
VM_MODE_P52V48_4K is not a valid mode for AArch64. Replace its
use in vm_create_default() with a mode that works and represents
a good AArch64 default. (We didn't ever see a problem with this
because we don't have any unit tests using vm_create_default(),
but it's good to get it fixed in advance.)

Reported-by: Thomas Huth <[email protected]>
Signed-off-by: Andrew Jones <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
Andrew Jones authored and bonzini committed May 24, 2019
1 parent bffed38 commit 55eda00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/kvm/lib/aarch64/processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ struct kvm_vm *vm_create_default(uint32_t vcpuid, uint64_t extra_mem_pages,
uint64_t extra_pg_pages = (extra_mem_pages / ptrs_per_4k_pte) * 2;
struct kvm_vm *vm;

vm = vm_create(VM_MODE_P52V48_4K, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages, O_RDWR);
vm = vm_create(VM_MODE_P40V48_4K, DEFAULT_GUEST_PHY_PAGES + extra_pg_pages, O_RDWR);

kvm_vm_elf_load(vm, program_invocation_name, 0, 0);
vm_vcpu_add_default(vm, vcpuid, guest_code);
Expand Down

0 comments on commit 55eda00

Please sign in to comment.