]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: selftests: Add SMT control state helper
authorPratik R. Sampat <prsampat@amd.com>
Wed, 5 Mar 2025 22:59:54 +0000 (16:59 -0600)
committerSean Christopherson <seanjc@google.com>
Fri, 2 May 2025 19:32:33 +0000 (12:32 -0700)
commitacf064345018853ab2fc86a5637891d605ea60c8
treec652cfb26fa5ac6ea4715c91beda1167d839029c
parentc4e1a848d72179136f6ea9626933cb26c9d35eb5
KVM: selftests: Add SMT control state helper

Move the SMT control check out of the hyperv_cpuid selftest so that it
is generally accessible all KVM selftests. Split the functionality into
a helper that populates a buffer with SMT control value which other
helpers can use to ascertain if SMT state is available and active.

Signed-off-by: Pratik R. Sampat <prsampat@amd.com>
Link: https://lore.kernel.org/r/20250305230000.231025-5-prsampat@amd.com
[sean: prepend is_ to the helpers]
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/kvm_util.h
tools/testing/selftests/kvm/x86/hyperv_cpuid.c