mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
KVM: selftests: Move vcpu_args_set into perf_test_util
perf_test_util is used to set up KVM selftests where vCPUs touch a region of memory. The guest code is implemented in perf_test_util.c (not the calling selftests). The guest code requires a 1 parameter, the vcpuid, which has to be set by calling vcpu_args_set(vm, vcpu_id, 1, vcpu_id). Today all of the selftests that use perf_test_util are making this call. Instead, perf_test_util should just do it. This will save some code but more importantly prevents mistakes since totally non-obvious that this needs to be called and failing to do so results in vCPUs not accessing the right regions of memory. Signed-off-by: David Matlack <dmatlack@google.com> Message-Id: <20210805172821.2622793-1-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
609e6202ea
commit
32bdc01988
@@ -45,7 +45,6 @@ static void *vcpu_worker(void *data)
|
||||
struct kvm_vm *vm = perf_test_args.vm;
|
||||
struct kvm_run *run;
|
||||
|
||||
vcpu_args_set(vm, vcpu_id, 1, vcpu_id);
|
||||
run = vcpu_state(vm, vcpu_id);
|
||||
|
||||
/* Let the guest access its memory until a stop signal is received */
|
||||
|
||||
Reference in New Issue
Block a user