]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: selftests: Set input function/index in raw CPUID helper(s)
authorSean Christopherson <seanjc@google.com>
Tue, 14 Jun 2022 20:06:56 +0000 (20:06 +0000)
committerSean Christopherson <seanjc@google.com>
Thu, 14 Jul 2022 01:14:21 +0000 (18:14 -0700)
commit132ed47948204ccba2f99926754c021bd1382ce6
treef57f967204394d7f341905b709e07b16a44abb0d
parente90f15c69bd5cd189f356ac07e0abae2022d8aaf
KVM: selftests: Set input function/index in raw CPUID helper(s)

Set the function/index for CPUID in the helper instead of relying on the
caller to do so.  In addition to reducing the risk of consuming an
uninitialized ECX, having the function/index embedded in the call makes
it easier to understand what is being checked.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-32-seanjc@google.com
tools/testing/selftests/kvm/include/x86_64/processor.h
tools/testing/selftests/kvm/lib/x86_64/processor.c
tools/testing/selftests/kvm/x86_64/amx_test.c
tools/testing/selftests/kvm/x86_64/cpuid_test.c