From: "Ahmed S. Darwish" <darwi@linutronix.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Cooper <andrew.cooper3@citrix.com>,
x86@kernel.org, John Ogness <john.ogness@linutronix.de>,
x86-cpuid@lists.linux.dev, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 10/12] tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.0
Date: Mon, 10 Mar 2025 15:47:15 +0100 [thread overview]
Message-ID: <Z877c2pAEYQ8SjCW@lx-t490> (raw)
In-Reply-To: <B5E71AD5-3AA3-4B2D-A832-D95F72454E0F@zytor.com>
Hi!
On Fri, 07 Mar 2025, H. Peter Anvin wrote:
>
> On Fri, 07 Mar 2025, Ahmed S. Darwish wrote
> >
> > Thanks, I missed that Pentium III can provide leaf 0x3 as well.
> >
> > It seems that leaf 0x3's format differs between Intel and Transmeta.
> > On Intel, PSN is at ECX:EDX, while on Transmeta, the PSN is at
> > EAX:EBX, and ECX:EDX on non-evaluation models provide the rest. [*]
> >
> > Unfortunately, so far, x86-cpuid-db does not support having a CPUID
> > bitfield with different interpretations across vendors.
> >
> > Given that Linux force disables PSN at early boot, I'll just remove
> > that leaf from the database — for now. (Time wise, finishing the new
> > linux/arch/x86/ CPUID data model for mainline submission is a much
> > higher priority.)
> >
>
> You can simply output the 128 bits as is. Some vendors will have zeroes
> in some of the fields, but it doesn't matter.
>
The x86-cpuid-db schema works on a register-by-register basis. For
example, here is db/xml/leaf_03.xml (with Intel added as a vendor):
| <leaf id="0x3">
| <desc>Processor Serial Number (PSN)</desc>
| <text>
| If PSN is disabled, the returned register values are zero.
| </text>
| <vendors>
| <vendor>Intel</vendor>
| <vendor>Transmeta</vendor>
| </vendors>
| <subleaf id="0">
| <eax>...</eax>
| <ebx>...</ebx>
| <ecx>...</ecx>
| <edx>...</edx>
| </subleaf>
| </leaf>
Adding support for a one-shot EAX-EBX-ECX-EDX 128-bit range is definitely
doable, but it will require changes to the project's XML schema. And
given the output format change, the kcpuid CSV file generator and the C99
bitfields header file generator will also need to be changed.
It is doable of course: in no way I'd like to set the project "in stone."
But it's more work than what meets the eye, for a very low-priority leaf.
Thanks!
--
Ahmed S. Darwish
Linutronix GmbH
next prev parent reply other threads:[~2025-03-10 14:47 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 20:49 [PATCH v1 00/12] tools/x86/kcpuid: x86-cpuid-db v2.2 update Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 01/12] tools/x86/kcpuid: Fix error handling Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 02/12] tools/x86/kcpuid: Remove unused local variable Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 03/12] tools/x86/kcpuid: Remove unused global variable Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 04/12] tools/x86/kcpuid: Simplify usage() handling Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 05/12] tools/x86/kcpuid: Refactor CPUID range handling for future expansion Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 06/12] tools/x86/kcpuid: Extend CPUID index mask macro Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 07/12] tools/x86/kcpuid: Add rudimentary CPU vendor detection Ahmed S. Darwish
2025-03-06 21:07 ` Andrew Cooper
2025-03-07 14:06 ` Ahmed S. Darwish
2025-03-06 22:00 ` Dave Hansen
2025-03-07 13:48 ` Ahmed S. Darwish
2025-03-07 15:46 ` H. Peter Anvin
2025-03-07 15:03 ` Dave Hansen
2025-03-10 14:21 ` Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 08/12] tools/x86/kcpuid: Restrict CPUID scanning to valid vendor ranges Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 09/12] tools/x86/kcpuid: Define Transmeta and Centaur index ranges Ahmed S. Darwish
2025-03-06 20:49 ` [PATCH v1 10/12] tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.0 Ahmed S. Darwish
2025-03-07 3:18 ` H. Peter Anvin
2025-03-07 15:07 ` Ahmed S. Darwish
2025-03-07 15:27 ` H. Peter Anvin
2025-03-10 14:47 ` Ahmed S. Darwish [this message]
2025-03-06 20:49 ` [PATCH v1 11/12] tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.2 Ahmed S. Darwish
2025-03-06 20:50 ` [PATCH v1 12/12] MAINTAINERS: Include kcpuid under X86 CPUID DATABASE Ahmed S. Darwish
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=Z877c2pAEYQ8SjCW@lx-t490 \
--to=darwi@linutronix.de \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86-cpuid@lists.linux.dev \
--cc=x86@kernel.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