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)
commit8fe09d6a91be94be6910d843bb21d60b1fc99cd2
treef57f967204394d7f341905b709e07b16a44abb0d
parent813e38cd6d7b4247314427a901015867e0534356
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