lkml.org 
[lkml]   [2022]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86/perf: Fixed kernel panic during boot on Nano processor.
On Thu, Nov 03, 2022 at 11:23:04AM +0800, silviazhao-oc wrote:
> Nano processor may not fully support rdpmc instruction,

What does that even mean? Not fully support?

> it works well for reading general pmc counter, but will lead
> GP(general protection) when accessing fixed pmc counter.

RDPMC will #GP when the perf counter specified cannot be read.

AFAICT, that is RCX: 0000000040000001 which looks like perf counter
index 1 with INTEL_PMC_FIXED_RDPMC_BASE ORed in.

> Furthermore, family/mode information is same between Nano processor
> and ZX-C processor, it leads to zhaoxin pmu driver is wrongly loaded
> for Nano processor, which resulting boot kernal fail.

So *that* is the real problem - it tries to access perf counters
thinking it is running on architectural perf counters implementation but
nano doesn't have that.

> To solve this problem, stepping information will be checked to distinguish
> between Nano processor and ZX-C processor.

Why doesn't that ZXC thing doesn't have a CPUID flag to check instead of
looking at models and steppings and thus confusing it with a nano CPU?

> [https://bugzilla.kernel.org/show_bug.cgi?id=212389]
>
> Reported-by: Arjan <8vvbbqzo567a@nospam.xutrox.com>

Does Arjan have a last name?

> Signed-off-by: silviazhao-oc <silviazhao-oc@zhaoxin.com>

I'm assuming your name is properly spelled "Silvia Zhao" and not in a
single word with a "-oc" string appended at the end, yes?

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette

\
 
 \ /
  Last update: 2022-11-03 11:08    [W:0.031 / U:3.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site