summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/lib/memstress.c
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2025-06-25 17:12:23 -0700
committerSean Christopherson <seanjc@google.com>2025-07-09 09:33:40 -0700
commite83ee6f76c33de80d5fe4cec523e2b95bfc5e3ea (patch)
treeff2917a9cce6b62bbc66a85c59528a368e1e938a /tools/testing/selftests/kvm/lib/memstress.c
parenta7cec20845a67ff4f3c924255519341f37d993f9 (diff)
KVM: selftests: Expand set of APIs for pinning tasks to a single CPU
Expand kvm_pin_this_task_to_pcpu() into a set of APIs to allow pinning a task (or self) to a CPU (any or specific). This will allow deduplicating code throughout a variety of selftests. Opportunistically use "self" instead of "this_task" as it is both more concise and less ambiguous. Link: https://lore.kernel.org/r/20250626001225.744268-4-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/testing/selftests/kvm/lib/memstress.c')
-rw-r--r--tools/testing/selftests/kvm/lib/memstress.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/lib/memstress.c b/tools/testing/selftests/kvm/lib/memstress.c
index 313277486a1d..557c0a0a5658 100644
--- a/tools/testing/selftests/kvm/lib/memstress.c
+++ b/tools/testing/selftests/kvm/lib/memstress.c
@@ -265,7 +265,7 @@ static void *vcpu_thread_main(void *data)
int vcpu_idx = vcpu->vcpu_idx;
if (memstress_args.pin_vcpus)
- kvm_pin_this_task_to_pcpu(memstress_args.vcpu_to_pcpu[vcpu_idx]);
+ pin_self_to_cpu(memstress_args.vcpu_to_pcpu[vcpu_idx]);
WRITE_ONCE(vcpu->running, true);