public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] KVM: selftests: Fix PMC checks in PMU counters test
@ 2025-01-17 23:41 Sean Christopherson
  2025-01-17 23:41 ` [PATCH 1/5] KVM: selftests: Make Intel arch events globally available " Sean Christopherson
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Sean Christopherson @ 2025-01-17 23:41 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel, kernel test robot

Fix a flaw in the Intel PMU counters test where it asserts that an event is
counting correctly without actually knowing what the event counts given the
underlying hardware.

The bug manifests as failures with the Top-Down Slots architectural event
when running CPUs that doesn't actually support that arch event (pre-ICX).
The arch event encoding still counts _something_, just not Top-Down Slots
(I haven't bothered to look up what it was counting).  The passed by sheer
dumb luck until an unrelated change caused the count of the unknown event
to drop.

All credit to Dapeng for hunting down the problem.

Sean Christopherson (5):
  KVM: selftests: Make Intel arch events globally available in PMU
    counters test
  KVM: selftests: Only validate counts for hardware-supported arch
    events
  KVM: selftests: Remove dead code in Intel PMU counters test
  KVM: selftests: Drop the "feature event" param from guest test helpers
  KVM: selftests: Print out the actual Top-Down Slots count on failure

 .../selftests/kvm/x86/pmu_counters_test.c     | 143 ++++++++++--------
 1 file changed, 83 insertions(+), 60 deletions(-)


base-commit: eb723766b1030a23c38adf2348b7c3d1409d11f0
-- 
2.48.0.rc2.279.g1de40edade-goog


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-02-15  0:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-17 23:41 [PATCH 0/5] KVM: selftests: Fix PMC checks in PMU counters test Sean Christopherson
2025-01-17 23:41 ` [PATCH 1/5] KVM: selftests: Make Intel arch events globally available " Sean Christopherson
2025-01-17 23:42 ` [PATCH 2/5] KVM: selftests: Only validate counts for hardware-supported arch events Sean Christopherson
2025-01-18  0:06   ` Mingwei Zhang
2025-01-18  0:39     ` Sean Christopherson
2025-01-20 16:12       ` Paolo Bonzini
2025-01-22  4:51       ` Mingwei Zhang
2025-01-24 15:57         ` Sean Christopherson
2025-01-17 23:42 ` [PATCH 3/5] KVM: selftests: Remove dead code in Intel PMU counters test Sean Christopherson
2025-01-17 23:42 ` [PATCH 4/5] KVM: selftests: Drop the "feature event" param from guest test helpers Sean Christopherson
2025-01-17 23:42 ` [PATCH 5/5] KVM: selftests: Print out the actual Top-Down Slots count on failure Sean Christopherson
2025-01-20 16:17 ` [PATCH 0/5] KVM: selftests: Fix PMC checks in PMU counters test Paolo Bonzini
2025-02-10 23:38   ` Sean Christopherson
2025-02-15  0:50 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox