[GIT PULL] KVM: Selftests changes for 6.13

From: Sean Christopherson
Date: Tue Nov 12 2024 - 15:36:01 EST


Essentially AVX support, plus a few minor cleanups.

Far more noteworth is what's not in this pull request. For 6.14, I want
to I want to land series with KVM-selftests-tree-wide impact: one that
changes^fixes the prototype for vcpu_get_reg(), and another that uses the
kernel's canonical $(ARCH) directory scheme instead of KVM selftests'
homebrewed $(ARCH_DIR). My plan is to refresh both series after all arch
pull requests for 6.13 have landed, and then pester you incessantly to
apply them :-)

https://lore.kernel.org/all/20241009154953.1073471-1-seanjc@xxxxxxxxxx
https://lore.kernel.org/all/20240826190116.145945-1-seanjc@xxxxxxxxxx

The following changes since commit 81983758430957d9a5cb3333fe324fd70cf63e7e:

Linux 6.12-rc5 (2024-10-27 12:52:02 -1000)

are available in the Git repository at:

https://github.com/kvm-x86/linux.git tags/kvm-x86-selftests-6.13

for you to fetch changes up to 89f8869835e4da836bc60ab20568b7864706f94b:

KVM: selftests: Ensure KVM supports AVX for SEV-ES VMSA FPU test (2024-11-01 09:26:37 -0700)

----------------------------------------------------------------
KVM selftests changes for 6.13

- Enable XFAM-based features by default for all selftests VMs, which will
allow removing the "no AVX" restriction.

----------------------------------------------------------------
Ba Jing (1):
KVM: selftests: Remove unused macro in the hardware disable test

Jiapeng Chong (1):
KVM: selftests: Use ARRAY_SIZE for array length

Sean Christopherson (10):
KVM: selftests: Precisely mask off dynamic fields in CPUID test
KVM: selftests: Mask off OSPKE and OSXSAVE when comparing CPUID entries
KVM: selftests: Rework OSXSAVE CR4=>CPUID test to play nice with AVX insns
KVM: selftests: Configure XCR0 to max supported value by default
KVM: selftests: Verify XCR0 can be "downgraded" and "upgraded"
KVM: selftests: Drop manual CR4.OSXSAVE enabling from CR4/CPUID sync test
KVM: selftests: Drop manual XCR0 configuration from AMX test
KVM: selftests: Drop manual XCR0 configuration from state test
KVM: selftests: Drop manual XCR0 configuration from SEV smoke test
KVM: selftests: Ensure KVM supports AVX for SEV-ES VMSA FPU test

.../testing/selftests/kvm/hardware_disable_test.c | 1 -
.../selftests/kvm/include/x86_64/processor.h | 5 ++
tools/testing/selftests/kvm/lib/x86_64/processor.c | 24 ++++++++
tools/testing/selftests/kvm/x86_64/amx_test.c | 23 ++------
tools/testing/selftests/kvm/x86_64/cpuid_test.c | 67 ++++++++++++++--------
.../selftests/kvm/x86_64/cr4_cpuid_sync_test.c | 53 +++++++++++------
tools/testing/selftests/kvm/x86_64/debug_regs.c | 2 +-
.../testing/selftests/kvm/x86_64/sev_smoke_test.c | 19 ++----
tools/testing/selftests/kvm/x86_64/state_test.c | 5 --
.../testing/selftests/kvm/x86_64/xcr0_cpuid_test.c | 11 +++-
10 files changed, 123 insertions(+), 87 deletions(-)