On Mon, Apr 24, 2023 at 7:35 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote: > > KVM x86 selftests change for 6.4. And an AMX+XCR0 bugfix that I landed here > to avoid creating a mess of unnecessary conflicts between the series to > overhaul the AMX test and the related selftests changes to verify the fix. > > The following changes since commit d8708b80fa0e6e21bc0c9e7276ad0bccef73b6e7: > > KVM: Change return type of kvm_arch_vm_ioctl() to "int" (2023-03-16 10:18:07 -0400) > > are available in the Git repository at: > > https://github.com/kvm-x86/linux.git tags/kvm-x86-selftests-6.4 > > for you to fetch changes up to 20aef201dafba6a1ffe9daa145c7f2c525b74aae: > > KVM: selftests: Fix spelling mistake "perrmited" -> "permitted" (2023-04-14 10:04:51 -0700) Pulled (put not pushed yet), thanks. Paolo > ---------------------------------------------------------------- > KVM selftests, and an AMX/XCR0 bugfix, for 6.4: > > - Don't advertisze XTILE_CFG in KVM_GET_SUPPORTED_CPUID if XTILE_DATA is > not being reported due to userspace not opting in via prctl() > > - Overhaul the AMX selftests to improve coverage and cleanup the test > > - Misc cleanups > > ---------------------------------------------------------------- > Aaron Lewis (9): > KVM: selftests: Assert that XTILE is XSAVE-enabled > KVM: selftests: Assert that both XTILE{CFG,DATA} are XSAVE-enabled > KVM: selftests: Move XSAVE and OSXSAVE CPUID checks into AMX's init_regs() > KVM: selftests: Check that the palette table exists before using it > KVM: selftests: Check that XTILEDATA supports XFD > KVM: x86: Add a helper to handle filtering of unpermitted XCR0 features > KVM: selftests: Move XGETBV and XSETBV helpers to common code > KVM: selftests: Add all known XFEATURE masks to common code > KVM: selftests: Add test to verify KVM's supported XCR0 > > Ackerley Tng (1): > KVM: selftests: Adjust VM's initial stack address to align with SysV ABI spec > > Anish Moorthy (1): > KVM: selftests: Fix nsec to sec conversion in demand_paging_test > > Colin Ian King (1): > KVM: selftests: Fix spelling mistake "perrmited" -> "permitted" > > Hao Ge (1): > KVM: selftests: Close opened file descriptor in stable_tsc_check_supported() > > Ivan Orlov (1): > KVM: selftests: Add 'malloc' failure check in vcpu_save_state > > Like Xu (2): > KVM: selftests: Add a helper to read kvm boolean module parameters > KVM: selftests: Report enable_pmu module value when test is skipped > > Mingwei Zhang (6): > KVM: selftests: Add a fully functional "struct xstate" for x86 > KVM: selftests: Fix an error in comment of amx_test > KVM: selftests: Enable checking on xcomp_bv in amx_test > KVM: selftests: Add check of CR0.TS in the #NM handler in amx_test > KVM: selftests: Assert that XTILE_DATA is set in IA32_XFD on #NM > KVM: selftests: Verify XTILE_DATA in XSTATE isn't affected by IA32_XFD > > Sean Christopherson (2): > KVM: x86: Filter out XTILE_CFG if XTILE_DATA isn't permitted > KVM: selftests: Rework dynamic XFeature helper to take mask, not bit > > arch/x86/kvm/cpuid.c | 2 +- > arch/x86/kvm/x86.c | 4 +- > arch/x86/kvm/x86.h | 29 +++++ > tools/testing/selftests/kvm/Makefile | 1 + > tools/testing/selftests/kvm/demand_paging_test.c | 2 +- > .../testing/selftests/kvm/include/kvm_util_base.h | 1 + > .../selftests/kvm/include/x86_64/processor.h | 83 +++++++++++-- > tools/testing/selftests/kvm/lib/kvm_util.c | 5 + > tools/testing/selftests/kvm/lib/x86_64/processor.c | 36 ++++-- > tools/testing/selftests/kvm/x86_64/amx_test.c | 118 ++++++++---------- > .../selftests/kvm/x86_64/pmu_event_filter_test.c | 1 + > .../kvm/x86_64/vmx_nested_tsc_scaling_test.c | 8 +- > .../selftests/kvm/x86_64/vmx_pmu_caps_test.c | 1 + > .../testing/selftests/kvm/x86_64/xcr0_cpuid_test.c | 132 +++++++++++++++++++++ > 14 files changed, 326 insertions(+), 97 deletions(-) > create mode 100644 tools/testing/selftests/kvm/x86_64/xcr0_cpuid_test.c >