public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
	"Liang, Kan" <kan.liang@linux.intel.com>
Cc: acme@redhat.com, linux-kernel@vger.kernel.org,
	alexander.shishkin@linux.intel.com,
	Jianfeng Gao <jianfeng.gao@intel.com>
Subject: Re: [RESEND PATCH] perf/x86/intel: Fix unchecked MSR access error for Alder Lake N
Date: Mon, 22 Aug 2022 16:31:43 +0200	[thread overview]
Message-ID: <14f7f3d2-e85b-f77a-bbac-abe3afd74321@linux.intel.com> (raw)
In-Reply-To: <YwOJHLuX57Q4e/wH@worktop.programming.kicks-ass.net>


On 8/22/2022 3:48 PM, Peter Zijlstra wrote:
> On Mon, Aug 22, 2022 at 09:28:31AM -0400, Liang, Kan wrote:
>>
>> On 2022-08-19 10:38 a.m., Peter Zijlstra wrote:
>>> On Thu, Aug 18, 2022 at 11:15:30AM -0700, kan.liang@linux.intel.com wrote:
>>>> From: Kan Liang <kan.liang@linux.intel.com>
>>>>
>>>> For some Alder Lake N machine, the below unchecked MSR access error may be
>>>> triggered.
>>>>
>>>> [ 0.088017] rcu: Hierarchical SRCU implementation.
>>>> [ 0.088017] unchecked MSR access error: WRMSR to 0x38f (tried to write
>>>> 0x0001000f0000003f) at rIP: 0xffffffffb5684de8 (native_write_msr+0x8/0x30)
>>>> [ 0.088017] Call Trace:
>>>> [ 0.088017] <TASK>
>>>> [ 0.088017] __intel_pmu_enable_all.constprop.46+0x4a/0xa0
>>> FWIW, I seem to get the same error when booting KVM on my ADL. I'm
>>> fairly sure the whole CPUID vs vCPU thing is a trainwreck.
>> We will enhance the CPUID to address the issues. Hopefully, we can have
>> them supported in the next generation.
> How!? A vCPU can readily migrate between a big and small CPU. There is
> no way the guest can sanely program the (v)MSRs and expect it to work.

In principle this can be fixed by affinitizing the vcpus to their 
respective type and reporting the right type, and I thought qemu was 
supported to support this. But it would be certainly a much more complex 
command line.

If you don't do this, architectural events should work, but yes any non 
architectural will not count correctly.

I guess one way to detect this situation would be if the CPUID is 
Alderlake, but there is no hybrid support reported in CPUID. Then it's 
likely a situation like this and it could be special cased in the perf 
tools and only show a limited event list.

-Andi



  reply	other threads:[~2022-08-22 14:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 18:15 [RESEND PATCH] perf/x86/intel: Fix unchecked MSR access error for Alder Lake N kan.liang
2022-08-19  8:05 ` Peter Zijlstra
2022-08-19  8:33   ` Peter Zijlstra
2022-08-22 13:24     ` Liang, Kan
2022-08-22 13:55       ` Peter Zijlstra
2022-08-22 15:20         ` Liang, Kan
2022-08-19 14:38 ` Peter Zijlstra
2022-08-22 13:28   ` Liang, Kan
2022-08-22 13:48     ` Peter Zijlstra
2022-08-22 14:31       ` Andi Kleen [this message]
2022-08-22 14:39     ` Peter Zijlstra
2022-08-22 14:51       ` Andrew Cooper
2022-08-22 14:59       ` Liang, Kan
2022-08-22 15:21         ` Peter Zijlstra
2022-08-22 15:08       ` Andi Kleen
2022-08-22 15:47         ` Peter Zijlstra
2022-08-22 18:21           ` Sean Christopherson
2022-08-22 19:21             ` Andi Kleen

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=14f7f3d2-e85b-f77a-bbac-abe3afd74321@linux.intel.com \
    --to=ak@linux.intel.com \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jianfeng.gao@intel.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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