[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z871cVjBXy2A-5E0@lx-t490>
Date: Mon, 10 Mar 2025 15:21:37 +0100
From: "Ahmed S. Darwish" <darwi@...utronix.de>
To: Dave Hansen <dave.hansen@...el.com>
Cc: Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Andrew Cooper <andrew.cooper3@...rix.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
John Ogness <john.ogness@...utronix.de>, x86-cpuid@...ts.linux.dev,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v1 07/12] tools/x86/kcpuid: Add rudimentary CPU vendor
detection
Hi,
On Fri, 07 Mar 2025, Dave Hansen wrote:
>
> Do we really need the vendor detection? For example, look at the end of
> cpuid(1)'s output:
>
...
>
> It seems to just blindly poke at all of the CPUID regions. There are
> only a handful of these and there's no hard in poking at them other
> than an extra couple of executions of CPUID.
>
Good point, thanks a lot.
I've checked the cpuid(1) code now. Indeed, it just tries its luck for
all CPUID ranges. If the returned CPUID range max function "does not
make sense" (i.e., smaller than the range's start index), it silently
ignores the whole range.
I'll do something similar in v2 then.
(After removing kcpuid's vendor check, its first run, where CPUID is
invoked, will need a minor change. kcpuid's second run, where the CSV
file is parsed line by line, won't need any changes. So, not adding CPU
vendor checks is indeed a win.)
Thanks!
--
Ahmed S. Darwish
Linutronix GmbH
Powered by blists - more mailing lists