Skip to content

KVM: selftests: Fix PMC checks in PMU counters test

Sean Christopherson kvm lkml 1 version Applied

Status from this message: Queued for 6.14-rc1, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5KVM: selftests: Make Intel arch events globally available in PMU counters testtools/testing/selftests/kvm/x86/pmu_counters_test.c+49 -350 replies
2/5KVM: selftests: Only validate counts for hardware-supported arch eventstools/testing/selftests/kvm/x86/pmu_counters_test.c+18 -75 replies
3/5KVM: selftests: Remove dead code in Intel PMU counters testtools/testing/selftests/kvm/x86/pmu_counters_test.c+8 -90 replies
4/5KVM: selftests: Drop the "feature event" param from guest test helperstools/testing/selftests/kvm/x86/pmu_counters_test.c+8 -110 replies
5/5KVM: selftests: Print out the actual Top-Down Slots count on failuretools/testing/selftests/kvm/x86/pmu_counters_test.c+3 -10 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by.

PatchDapeng Mi
1/5
2/5Debugged-by
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] KVM: selftests: Fix PMC checks in PMU counters test

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

Signature · 1 line
2.48.0.rc2.279.g1de40edade-goog