Re: [GIT PULL] KVM: Selftests changes for 7.1

From: Paolo Bonzini

Date: Mon Apr 13 2026 - 06:54:45 EST


On Sat, Apr 11, 2026 at 1:58 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> Add Hygon support, fix a related bug in the MSR test, and add MADV_COLLAPSE
> regression test for guest_memfd.
>
> I'm also going to post patches and send a pull request to convert selftests to
> kernel-style u{8,16,32,64} types after you merge all initial arch pulls.
> Please yell at me if you don't see anything on that front by ~Wednesday.
>
> The following changes since commit 11439c4635edd669ae435eec308f4ab8a0804808:
>
> Linux 7.0-rc2 (2026-03-01 15:39:31 -0800)
>
> are available in the Git repository at:
>
> https://github.com/kvm-x86/linux.git tags/kvm-x86-selftests-7.1
>
> for you to fetch changes up to 9830209b4ae8c8eecae7e6af271cebf1e1285142:
>
> KVM: selftests: Test MADV_COLLAPSE on guest_memfd (2026-03-04 14:57:27 -0800)

Pulled, thanks.

Paolo

> ----------------------------------------------------------------
> KVM selftests changes for 7.1
>
> - Add support for Hygon CPUs in KVM selftests.
>
> - Fix a bug in the MSR test where it would get false failures on AMD/Hygon
> CPUs with exactly one of RDPID or RDTSCP.
>
> - Add an MADV_COLLAPSE testcase for guest_memfd as a regression test for a
> bug where the kernel would attempt to collapse guest_memfd folios against
> KVM's will.
>
> ----------------------------------------------------------------
> Ackerley Tng (2):
> KVM: selftests: Wrap madvise() to assert success
> KVM: selftests: Test MADV_COLLAPSE on guest_memfd
>
> Sean Christopherson (1):
> KVM: selftests: Fix reserved value WRMSR testcase for multi-feature MSRs
>
> Zhiquan Li (3):
> KVM: selftests: Add CPU vendor detection for Hygon
> KVM: selftests: Add a flag to identify AMD compatible test cases
> KVM: selftests: Allow the PMU event filter test for Hygon
>
> tools/testing/selftests/kvm/guest_memfd_test.c | 70 +++++++++++++++++++++-
> tools/testing/selftests/kvm/include/kvm_syscalls.h | 1 +
> .../testing/selftests/kvm/include/x86/processor.h | 7 +++
> tools/testing/selftests/kvm/lib/x86/processor.c | 15 +++--
> .../testing/selftests/kvm/x86/fix_hypercall_test.c | 2 +-
> tools/testing/selftests/kvm/x86/msrs_test.c | 4 +-
> .../selftests/kvm/x86/pmu_event_filter_test.c | 3 +-
> tools/testing/selftests/kvm/x86/xapic_state_test.c | 2 +-
> 8 files changed, 92 insertions(+), 12 deletions(-)
>