aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/lib/perf_test_util.c
diff options
context:
space:
mode:
authorSean Christopherson <[email protected]>2022-04-20 19:15:50 +0000
committerPaolo Bonzini <[email protected]>2022-06-11 15:47:18 +0000
commit376851f8953a28be237b0a99adef91f422fa8f19 (patch)
tree3450b99bb038639d92fc4d9bfcb6e7efa3868e42 /tools/testing/selftests/kvm/lib/perf_test_util.c
parentKVM: selftests: Convert get-reg-list away from its "VCPU_ID" (diff)
downloadkernel-376851f8953a28be237b0a99adef91f422fa8f19.tar.gz
kernel-376851f8953a28be237b0a99adef91f422fa8f19.zip
KVM: selftests: Stop hardcoding vCPU IDs in vcpu_width_config
In preparation for taking a vCPU pointer in vCPU-scoped functions, grab the vCPU(s) created by __vm_vcpu_add() and use the ID from the vCPU object instead of hardcoding the ID in ioctl() invocations. Rename init1/init2 => init0/init1 to avoid having odd/confusing code where vcpu0 consumes init1 and vcpu1 consumes init2. Note, this change could easily be done when the functions are converted in the future, and/or the vcpu{0,1} vs. init{1,2} discrepancy could be ignored, but then there would be no opportunity to poke fun at the 1-based counting scheme. Signed-off-by: Sean Christopherson <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/perf_test_util.c')
0 files changed, 0 insertions, 0 deletions