[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250712172522.187414-1-dapeng1.mi@linux.intel.com>
Date: Sat, 12 Jul 2025 17:25:18 +0000
From: Dapeng Mi <dapeng1.mi@...ux.intel.com>
To: Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>
Cc: kvm@...r.kernel.org,
linux-kernel@...r.kernel.org,
Jim Mattson <jmattson@...gle.com>,
Mingwei Zhang <mizhang@...gle.com>,
Zide Chen <zide.chen@...el.com>,
Das Sandipan <Sandipan.Das@....com>,
Shukla Manali <Manali.Shukla@....com>,
Yi Lai <yi1.lai@...el.com>,
Dapeng Mi <dapeng1.mi@...el.com>,
Dapeng Mi <dapeng1.mi@...ux.intel.com>
Subject: [PATCH 0/3] Fix PMU kselftests errors on SRF and CWF
This small patchset fixes PMU kselftest errors on Sierra Forest (SRF) and
Clearwater Forest (CWF).
Patch 1/3 adds validation support for newly introduced 5 architectural
events on CWF. Without this patch, pmu_counter_test asserts failure
"New architectural event(s) detected; please update this test".
On Intel Atom platforms, the PMU events "Instruction Retired" or
"Branch Instruction Retired" may be overcounted for some certain
instructions, like FAR CALL/JMP, RETF, IRET, VMENTRY/VMEXIT/VMPTRLD
and complex SGX/SMX/CSTATE instructions/flows[1].
In details, for the Atom platforms before Sierra Forest (including
Sierra Forest), Both 2 events "Instruction Retired" and
"Branch Instruction Retired" would be overcounted on these certain
instructions, but for Clearwater Forest only "Instruction Retired" event
is overcounted on these instructions.
As this overcount issue, pmu_counters_test and pmu_event_filter_test
would fail on the precise event count validation for these 2 events on
Atom platforms.
To work around this Atom platform overcount issue, Patches 2-3/3 relax
the precise event count validation if the platform is detected to have
the overcount issue.
Tests:
* PMU kselftests (pmu_counters_test/pmu_event_filter_test/
vmx_pmu_caps_test) passed on GNR/SRF/CWF platforms.
Ref:
[1] https://edc.intel.com/content/www/us/en/design/products-and-solutions/processors-and-chipsets/sierra-forest/xeon-6700-series-processor-with-e-cores-specification-update/errata-details
Dapeng Mi (2):
KVM: Selftests: Validate more arch-events in pmu_counters_test
KVM: selftests: Relax branches event count check for event_filter test
dongsheng (1):
KVM: selftests: Relax precise event count validation as overcount
issue
tools/testing/selftests/kvm/include/x86/pmu.h | 19 ++++++++
.../selftests/kvm/include/x86/processor.h | 7 ++-
tools/testing/selftests/kvm/lib/x86/pmu.c | 43 +++++++++++++++++++
.../selftests/kvm/x86/pmu_counters_test.c | 39 ++++++++++++++---
.../selftests/kvm/x86/pmu_event_filter_test.c | 9 +++-
5 files changed, 108 insertions(+), 9 deletions(-)
base-commit: 772d50d9b87bec08b56ecee0a880d6b2ee5c7da5
--
2.43.0
Powered by blists - more mailing lists