]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: Expand set of APIs for pinning tasks to a single CPU
authorSean Christopherson <seanjc@google.com>
Thu, 26 Jun 2025 00:12:23 +0000 (17:12 -0700)
committerSean Christopherson <seanjc@google.com>
Wed, 9 Jul 2025 16:33:40 +0000 (09:33 -0700)
commite83ee6f76c33de80d5fe4cec523e2b95bfc5e3ea
treeff2917a9cce6b62bbc66a85c59528a368e1e938a
parenta7cec20845a67ff4f3c924255519341f37d993f9
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>
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/lib/kvm_util.c
tools/testing/selftests/kvm/lib/memstress.c