OSDN Git Service

KVM: selftests: Fill per-vCPU struct during "perf_test" VM creation
authorSean Christopherson <seanjc@google.com>
Thu, 11 Nov 2021 00:03:09 +0000 (00:03 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Nov 2021 12:43:27 +0000 (07:43 -0500)
commitcf1d59300ab27af6a2e96b4882fe3d9a72b32b15
tree5c4487c45b510449bcbb4169f795a365518f72db
parentf5e8fe2a92e4923b63d1edd6ed53d9856b6515ce
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>
tools/testing/selftests/kvm/access_tracking_perf_test.c
tools/testing/selftests/kvm/demand_paging_test.c
tools/testing/selftests/kvm/dirty_log_perf_test.c
tools/testing/selftests/kvm/include/perf_test_util.h
tools/testing/selftests/kvm/lib/perf_test_util.c
tools/testing/selftests/kvm/memslot_modification_stress_test.c