summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/hyp/nvhe/Makefile
diff options
context:
space:
mode:
authorGavin Shan <gshan@redhat.com>2022-10-13 09:30:20 +0300
committerMarc Zyngier <maz@kernel.org>2022-10-13 13:46:51 +0300
commit05c2224d4b049406b0545a10be05280ff4b8ba0a (patch)
treee2caf1dd46cf70b58248ab26daad452484ab3012 /arch/arm64/kvm/hyp/nvhe/Makefile
parent8a6ffcbe26fd14d58075dcf3cbdf1b5b69b20402 (diff)
downloadlinux-05c2224d4b049406b0545a10be05280ff4b8ba0a.tar.xz
KVM: selftests: Fix number of pages for memory slot in memslot_modification_stress_test
It's required by vm_userspace_mem_region_add() that memory size should be aligned to host page size. However, one guest page is provided by memslot_modification_stress_test. It triggers failure in the scenario of 64KB-page-size-host and 4KB-page-size-guest, as the following messages indicate. # ./memslot_modification_stress_test Testing guest mode: PA-bits:40, VA-bits:48, 4K pages guest physical test memory: [0xffbfff0000, 0xffffff0000) Finished creating vCPUs Started all vCPUs ==== Test Assertion Failure ==== lib/kvm_util.c:824: vm_adjust_num_guest_pages(vm->mode, npages) == npages pid=5712 tid=5712 errno=0 - Success 1 0x0000000000404eeb: vm_userspace_mem_region_add at kvm_util.c:822 2 0x0000000000401a5b: add_remove_memslot at memslot_modification_stress_test.c:82 3 (inlined by) run_test at memslot_modification_stress_test.c:110 4 0x0000000000402417: for_each_guest_mode at guest_modes.c:100 5 0x00000000004016a7: main at memslot_modification_stress_test.c:187 6 0x0000ffffb8cd4383: ?? ??:0 7 0x0000000000401827: _start at :? Number of guest pages is not compatible with the host. Try npages=16 Fix the issue by providing 16 guest pages to the memory slot for this particular combination of 64KB-page-size-host and 4KB-page-size-guest on aarch64. Fixes: ef4c9f4f65462 ("KVM: selftests: Fix 32-bit truncation of vm_get_max_gfn()") Signed-off-by: Gavin Shan <gshan@redhat.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20221013063020.201856-1-gshan@redhat.com
Diffstat (limited to 'arch/arm64/kvm/hyp/nvhe/Makefile')
0 files changed, 0 insertions, 0 deletions