]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: Reduce number of "unavailable PMU events" combos tested
authorSean Christopherson <seanjc@google.com>
Fri, 19 Sep 2025 21:46:46 +0000 (14:46 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 23 Sep 2025 15:38:59 +0000 (08:38 -0700)
commit1fcd3053aa1a6d4c417450c92ddb960b9edb1bf1
tree7de289c4ca11d44fa507cc8d7b14bff5f87c0623
parent571fc2833ed0195d016c96e003b3611e95e40f09
KVM: selftests: Reduce number of "unavailable PMU events" combos tested

Reduce the number of combinations of unavailable PMU events masks that are
testing by the PMU counters test.  In reality, testing every possible
combination isn't all that interesting, and certainly not worth the tens
of seconds (or worse, minutes) of runtime.  Fully testing the N^2 space
will be especially problematic in the near future, as 5! new arch events
are on their way.

Use alternating bit patterns (and 0 and -1u) in the hopes that _if_ there
is ever a KVM bug, it's not something horribly convoluted that shows up
only with a super specific pattern/value.

Reported-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Reviewed-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Tested-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Link: https://lore.kernel.org/r/20250919214648.1585683-4-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/x86/pmu_counters_test.c