summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/perf_test_util.h
diff options
context:
space:
mode:
authorBen Gardon <bgardon@google.com>2021-01-12 13:42:52 -0800
committerPaolo Bonzini <pbonzini@redhat.com>2021-02-04 05:27:19 -0500
commit82f91337ddde22eaa2e9e0aca248f5e6f336fa91 (patch)
treef519e6acb0f99554fcf298039b8de9464ae45369 /tools/testing/selftests/kvm/include/perf_test_util.h
parent86753bd04c7ca6b551b83c5395dd25e95de99aa4 (diff)
KVM: selftests: Add option to overlap vCPU memory access
Add an option to overlap the ranges of memory each vCPU accesses instead of partitioning them. This option will increase the probability of multiple vCPUs faulting on the same page at the same time, and causing interesting races, if there are bugs in the page fault handler or elsewhere in the kernel. Reviewed-by: Jacob Xu <jacobhxu@google.com> Reviewed-by: Makarand Sonare <makarandsonare@google.com> Signed-off-by: Ben Gardon <bgardon@google.com> Message-Id: <20210112214253.463999-6-bgardon@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/include/perf_test_util.h')
-rw-r--r--tools/testing/selftests/kvm/include/perf_test_util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/include/perf_test_util.h b/tools/testing/selftests/kvm/include/perf_test_util.h
index b1188823c31b..f406534f0487 100644
--- a/tools/testing/selftests/kvm/include/perf_test_util.h
+++ b/tools/testing/selftests/kvm/include/perf_test_util.h
@@ -46,6 +46,8 @@ extern uint64_t guest_test_phys_mem;
struct kvm_vm *perf_test_create_vm(enum vm_guest_mode mode, int vcpus,
uint64_t vcpu_memory_bytes);
void perf_test_destroy_vm(struct kvm_vm *vm);
-void perf_test_setup_vcpus(struct kvm_vm *vm, int vcpus, uint64_t vcpu_memory_bytes);
+void perf_test_setup_vcpus(struct kvm_vm *vm, int vcpus,
+ uint64_t vcpu_memory_bytes,
+ bool partition_vcpu_memory_access);
#endif /* SELFTEST_KVM_PERF_TEST_UTIL_H */