From: "Mi, Dapeng" <dapeng1.mi@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>,
Eranian Stephane <eranian@google.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Dapeng Mi <dapeng1.mi@intel.com>, Zide Chen <zide.chen@intel.com>,
Falcon Thomas <thomas.falcon@intel.com>,
Xudong Hao <xudong.hao@intel.com>,
stable@vger.kernel.org
Subject: Re: [Patch v3 1/8] perf/x86/intel: Remove anythread_deprecated bit from perf_capabilities
Date: Tue, 30 Jun 2026 17:14:41 +0800 [thread overview]
Message-ID: <27d77639-a948-4f0f-8cb5-1d06966bac0f@linux.intel.com> (raw)
In-Reply-To: <47a9642f-68ab-432c-a607-548995bd82fa@linux.intel.com>
On 6/17/2026 8:14 AM, Mi, Dapeng wrote:
> On 6/16/2026 6:02 PM, Peter Zijlstra wrote:
>> On Mon, Jun 15, 2026 at 08:59:29AM +0800, Mi, Dapeng wrote:
>>> On 6/12/2026 5:46 PM, Peter Zijlstra wrote:
>>>> On Fri, Jun 12, 2026 at 05:01:07PM +0800, Dapeng Mi wrote:
>>>>> AnyThread mode deprecation is enumerated by CPUID.0AH:EDX[15] instead of
>>>>> PERF_CAPABILITIES MSR. It's not a good practice to define a bit to
>>>>> represent "anythread deprecation" in perf_capabilities. It leads to the
>>>>> anythread_deprecated bit could be overwritten by the real value of
>>>>> PERF_CAPABILITIES MSR, just like the below code in update_pmu_cap() does.
>>>>>
>>>>> ```
>>>>> if (!intel_pmu_broken_perf_cap()) {
>>>>> /* Perf Metric (Bit 15) and PEBS via PT (Bit 16) are hybrid enumeration */
>>>>> rdmsrq(MSR_IA32_PERF_CAPABILITIES, hybrid(pmu, intel_cap).capabilities);
>>>>> }
>>>>> ```
>>>>>
>>>>> It leads to the anythread_deprecated bit is cleared to 0 and the "any"
>>>>> attribute is incorrectly shown in the /sys/devices/cpu/format/ folder on
>>>>> these support Perfmon v6 platforms, like Clearwater Forest.
>>>>>
>>>>> ```
>>>>> $grep . /sys/devices/cpu/format/*
>>>>> /sys/devices/cpu/format/acr_mask:config2:0-63
>>>>> /sys/devices/cpu/format/any:config:21
>>>>> /sys/devices/cpu/format/cmask:config:24-31
>>>>> ```
>>>>>
>>>>> So remove the anythread_deprecated bit from perf_capabilities structure
>>>>> and directly depends on CPUID.0AH:EDX[15] to judge if anythread is
>>>>> deprecated.
>>>> Again, no markdown please. I've stripped it from these patches.
>>> My bad. Thanks a lot.
>>>
>>> BTW, Peter, have you pull these patches? I didn't see them in perf/core or
>>> perf/urgent branches. Sashiko reports a defect about "Patch 5/8:
>>> perf/x86/intel: Validate the return value of intel_pmu_init_hybrid()". If
>>> not, I would post a v4 patchset to fix the defect. Thanks.
>>>
>> I had them in queue:perf/core, but realized it was *really* late in the
>> window. I'll probably move them into tip post -rc1. If there's a new
>> version by then, I'll be sure to pick it up.
> Thanks Peter. I posted the v4 patchset yesterday to fix the defect of
> Sashiko. Please pick up the v4 version. Here is the v4 patchset link.
>
> https://lore.kernel.org/all/20260616044654.3468742-1-dapeng1.mi@linux.intel.com/
Hi Peter,
Could you please queue above latest v4 patchset
(https://lore.kernel.org/all/20260616044654.3468742-1-dapeng1.mi@linux.intel.com/)
which fixes a defect in patch 5/8 "perf/x86/intel: Validate the return
value of intel_pmu_init_hybrid()"?
Besides this change, all changes of v4 are same with this v3 patchset?
Thanks!
>
>
>
next prev parent reply other threads:[~2026-06-30 9:14 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 9:01 [Patch v3 0/8] perf/x86: Miscellaneous PMU bug fixes Dapeng Mi
2026-06-12 9:01 ` [Patch v3 1/8] perf/x86/intel: Remove anythread_deprecated bit from perf_capabilities Dapeng Mi
2026-06-12 9:46 ` Peter Zijlstra
2026-06-15 0:59 ` Mi, Dapeng
2026-06-15 3:28 ` Mi, Dapeng
2026-06-16 10:02 ` Peter Zijlstra
2026-06-17 0:14 ` Mi, Dapeng
2026-06-30 9:14 ` Mi, Dapeng [this message]
2026-06-30 9:43 ` Peter Zijlstra
2026-06-30 9:44 ` Mi, Dapeng
2026-06-12 9:01 ` [Patch v3 2/8] perf/x86/intel: Keep cap_user_rdpmc in sync with RDPMC user-disable state Dapeng Mi
2026-06-12 9:01 ` [Patch v3 3/8] perf/x86/intel: Fallback to sw branch type decoding if no hw decoding Dapeng Mi
2026-06-12 9:21 ` sashiko-bot
2026-06-15 1:00 ` Mi, Dapeng
2026-06-15 1:03 ` Mi, Dapeng
2026-06-12 9:01 ` [Patch v3 4/8] perf/x86/intel: Fix kernel address leakages in LBR stack Dapeng Mi
2026-06-12 9:18 ` sashiko-bot
2026-06-15 1:01 ` Mi, Dapeng
2026-06-12 9:01 ` [Patch v3 5/8] perf/x86/intel: Validate the return value of intel_pmu_init_hybrid() Dapeng Mi
2026-06-12 9:31 ` sashiko-bot
2026-06-15 1:08 ` Mi, Dapeng
2026-06-12 9:01 ` [Patch v3 6/8] perf/x86/intel: Drop fixed-counter PEBS constraints for baseline PEBS Dapeng Mi
2026-06-12 9:01 ` [Patch v3 7/8] perf/core: Fix kernel register info leak via hardware skid Dapeng Mi
2026-06-12 9:01 ` [Patch v3 8/8] perf/core: Check kernel access when kernel callchains are requested Dapeng Mi
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=27d77639-a948-4f0f-8cb5-1d06966bac0f@linux.intel.com \
--to=dapeng1.mi@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dapeng1.mi@intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=thomas.falcon@intel.com \
--cc=xudong.hao@intel.com \
--cc=zide.chen@intel.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