public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 kernel test robot <oliver.sang@intel.com>
Subject: [PATCH 0/5] KVM: selftests: Fix PMC checks in PMU counters test
Date: Fri, 17 Jan 2025 15:41:58 -0800	[thread overview]
Message-ID: <20250117234204.2600624-1-seanjc@google.com> (raw)

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


             reply	other threads:[~2025-01-17 23:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-17 23:41 Sean Christopherson [this message]
2025-01-17 23:41 ` [PATCH 1/5] KVM: selftests: Make Intel arch events globally available in PMU counters test 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250117234204.2600624-1-seanjc@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.sang@intel.com \
    --cc=pbonzini@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox