Re: [PATCH] x86/perf/zhaoxin: Add stepping check for ZX-C

From: Borislav Petkov
Date: Mon Feb 06 2023 - 06:13:24 EST


Hi Silvia,

On Mon, Feb 06, 2023 at 06:55:21PM +0800, silviazhaooc wrote:
> Thanks for your reply.

You're welcome.

First of all, please do not top-post when replying on a public mailing
list but put your reply under the text you're replying to. Like the rest
of us do.

> As I mentioned before, Nano has several series. We cannot test if all of
> them have the bug.

If you cannot test if all of them have the bug, then testing the
stepping as you do is wrong too.

You need an unambiguous way to differentiate between ZXC and Nano CPUs.

If steppings >= 0xe belong solely to ZXC, then state that in a comment
above it so that you can exclude Nano.

If Nano starts using those steppings later, though, then that check will
become wrong too.

So I need a statement: "this is how you detect a ZXC CPU unambiguously"
and then use that method when enabling PMU support on it and *only* on
it.

Makes more sense?

Thx.

--
Regards/Gruss,
Boris.

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