diff options
| author | Ben Gardon <[email protected]> | 2021-02-02 18:57:33 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2021-02-04 10:27:19 +0000 |
| commit | 9e965bb75aaec28a9537e35871106367fe88b702 (patch) | |
| tree | ab538b57a25d30e453e0572a61d29977dec39d38 /tools/testing/selftests/kvm/lib/perf_test_util.c | |
| parent | KVM: selftests: Add memslot modification stress test (diff) | |
| download | kernel-9e965bb75aaec28a9537e35871106367fe88b702.tar.gz kernel-9e965bb75aaec28a9537e35871106367fe88b702.zip | |
KVM: selftests: Add backing src parameter to dirty_log_perf_test
Add a parameter to control the backing memory type for
dirty_log_perf_test so that the test can be run with hugepages.
To: [email protected]
CC: Peter Xu <[email protected]>
CC: Andrew Jones <[email protected]>
CC: Thomas Huth <[email protected]>
Signed-off-by: Ben Gardon <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/perf_test_util.c')
| -rw-r--r-- | tools/testing/selftests/kvm/lib/perf_test_util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/kvm/lib/perf_test_util.c b/tools/testing/selftests/kvm/lib/perf_test_util.c index f5fed2fbe964..81490b9b4e32 100644 --- a/tools/testing/selftests/kvm/lib/perf_test_util.c +++ b/tools/testing/selftests/kvm/lib/perf_test_util.c @@ -49,7 +49,8 @@ static void guest_code(uint32_t vcpu_id) } struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus, - uint64_t vcpu_memory_bytes) + uint64_t vcpu_memory_bytes, + enum vm_mem_backing_src_type backing_src) { struct kvm_vm *vm; uint64_t guest_num_pages; @@ -93,8 +94,7 @@ struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus, pr_info("guest physical test memory offset: 0x%lx\n", guest_test_phys_mem); /* Add an extra memory slot for testing */ - vm_userspace_mem_region_add(vm, VM_MEM_SRC_ANONYMOUS, - guest_test_phys_mem, + vm_userspace_mem_region_add(vm, backing_src, guest_test_phys_mem, PERF_TEST_MEM_SLOT_INDEX, guest_num_pages, 0); |
