selftests: kvm: fix overlapping addresses in memslot_perf_test
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 28 May 2021 19:10:58 +0000 (15:10 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 29 May 2021 10:28:06 +0000 (06:28 -0400)
commit000ac42953395a4f0a63d5db640c5e4c88a548c5
tree3197315271b7f39ad59bcd63439dc1a3bc2add0e
parenta3d2ec9d3c2fa7b6484da6493cc2a57af93cd0a4
selftests: kvm: fix overlapping addresses in memslot_perf_test

vm_create allocates memory and maps it close to GPA.  This memory
is separate from what is allocated in subsequent calls to
vm_userspace_mem_region_add, so it is incorrect to pass the
test memory size to vm_create_default.  Just pass a small
fixed amount of memory which can be used later for page table,
otherwise GPAs are already allocated at MEM_GPA and the
test aborts.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/memslot_perf_test.c