summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/access_tracking_perf_test.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-11-11 00:03:09 +0000
committerPaolo Bonzini <pbonzini@redhat.com>2021-11-16 07:43:27 -0500
commitcf1d59300ab27af6a2e96b4882fe3d9a72b32b15 (patch)
tree5c4487c45b510449bcbb4169f795a365518f72db /tools/testing/selftests/kvm/access_tracking_perf_test.c
parentf5e8fe2a92e4923b63d1edd6ed53d9856b6515ce (diff)
downloadlinux-cf1d59300ab27af6a2e96b4882fe3d9a72b32b15.tar.gz
linux-cf1d59300ab27af6a2e96b4882fe3d9a72b32b15.tar.bz2
linux-cf1d59300ab27af6a2e96b4882fe3d9a72b32b15.zip
KVM: selftests: Fill per-vCPU struct during "perf_test" VM creation
Fill the per-vCPU args when creating the perf_test VM instead of having the caller do so. This helps ensure that any adjustments to the number of pages (and thus vcpu_memory_bytes) are reflected in the per-VM args. Automatically filling the per-vCPU args will also allow a future patch to do the sync to the guest during creation. Signed-off-by: Sean Christopherson <seanjc@google.com> [Updated access_tracking_perf_test as well.] Signed-off-by: David Matlack <dmatlack@google.com> Reviewed-by: Ben Gardon <bgardon@google.com> Message-Id: <20211111000310.1435032-12-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/access_tracking_perf_test.c')
-rw-r--r--tools/testing/selftests/kvm/access_tracking_perf_test.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c b/tools/testing/selftests/kvm/access_tracking_perf_test.c
index 5d95113c7b7c..fdef6c906388 100644
--- a/tools/testing/selftests/kvm/access_tracking_perf_test.c
+++ b/tools/testing/selftests/kvm/access_tracking_perf_test.c
@@ -332,10 +332,7 @@ static void run_test(enum vm_guest_mode mode, void *arg)
int vcpus = params->vcpus;
vm = perf_test_create_vm(mode, vcpus, params->vcpu_memory_bytes, 1,
- params->backing_src);
-
- perf_test_setup_vcpus(vm, vcpus, params->vcpu_memory_bytes,
- !overlap_memory_access);
+ params->backing_src, !overlap_memory_access);
vcpu_threads = create_vcpu_threads(vcpus);