<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/arch/x86/kcpuid, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-05-06T08:01:57Z</updated>
<entry>
<title>tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.4</title>
<updated>2025-05-06T08:01:57Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-05-06T05:04:12Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=49394b5af45cc368c587371592a7c5f71834557e'/>
<id>urn:sha1:49394b5af45cc368c587371592a7c5f71834557e</id>
<content type='text'>
Update kcpuid's CSV file to version 2.4, as generated by x86-cpuid-db.

Summary of the v2.4 changes:

* Mark CPUID(0x80000001) EDX:23 bit, 'e_mmx', as not exclusive to
  Transmeta since it is supported by AMD as well.

Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Andrew Cooper &lt;andrew.cooper3@citrix.com&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: John Ogness &lt;john.ogness@linutronix.de&gt;
Cc: x86-cpuid@lists.linux.dev
Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.4/CHANGELOG.rst
Link: https://lore.kernel.org/r/20250506050437.10264-2-darwi@linutronix.de
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.3</title>
<updated>2025-03-25T08:53:47Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=300ba891418ae72df8d16fc26886f1d049c70907'/>
<id>urn:sha1:300ba891418ae72df8d16fc26886f1d049c70907</id>
<content type='text'>
Update kcpuid's CSV file to version 2.3, as generated by x86-cpuid-db.

Summary of the v2.3 changes:

* Per H. Peter Anvin's feedback, leaf 0x3 is not unique to Transmeta as
  the CSV file earlier claimed.  Since leaf 0x3's format differs between
  Intel and Transmeta, and the project does not yet support having the
  same CPUID bitfield with varying interpretations across vendors, leaf
  0x3 is removed for now.  Given that Intel discontinued support for PSN
  from Pentium 4 onward, and Linux force disables it on early boot for
  privacy concerns, this should have minimal impact.

* Leaf 0x80000021: Make bitfield IDs and descriptions coherent with each
  other.  Remove "_support" from bitfield IDs, as no other leaf has such
  convention.

Reported-by: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.3/CHANGELOG.rst
Link: https://lore.kernel.org/r/20250324142042.29010-20-darwi@linutronix.de

Closes: https://lkml.kernel.org/r/C7684E03-36E0-4D58-B6F0-78F4DB82D737@zytor.com
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.2</title>
<updated>2025-03-25T08:53:47Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:39Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5e0c3c5e95f09236e5f7a73615bfa2666c58f182'/>
<id>urn:sha1:5e0c3c5e95f09236e5f7a73615bfa2666c58f182</id>
<content type='text'>
Update kcpuid's CSV file to version 2.2, as generated by x86-cpuid-db.

Per Ingo Molnar's feedback, it is desired to always use CPUID in its
capitalized form.  The v2.2 release fixed all instances of small case
"cpuid" at the project's XML database, and thus all of its generated
files.

Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.2/CHANGELOG.rst
Link: https://lore.kernel.org/r/20250324142042.29010-19-darwi@linutronix.de

Closes: https://lkml.kernel.org/r/Z8bHK391zKE4gUEW@gmail.com
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.1</title>
<updated>2025-03-25T08:53:47Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:38Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f5e7fd6857963e697600d881242bbb39b0b9ac37'/>
<id>urn:sha1:f5e7fd6857963e697600d881242bbb39b0b9ac37</id>
<content type='text'>
Update kcpuid's CSV file to version 2.1, as generated by x86-cpuid-db.

Summary of the v2.1 changes:

* Use a standardized style for all x86 trademarks, registers, opcodes,
  byte units, hexadecimal digits, and x86 technical terms. This was
  enforced by a number of x86-specific hunspell(5) dictionary and affix
  files at the x86-cpuid-db project's CI pipeline.

* Expand abbreviated terms that might be OK in code but not in official
  listings (e.g., "addr", "instr", "reg", "virt", etc.)

* Add new Zen5 SoC bits to leaf 0x80000020 and leaf 0x80000021.

Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.1/CHANGELOG.rst
Link: https://lore.kernel.org/r/20250324142042.29010-18-darwi@linutronix.de
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Update bitfields to x86-cpuid-db v2.0</title>
<updated>2025-03-25T08:53:47Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e1dde2f5a4ef4a0e91a67adebb7037bbfbcb0c50'/>
<id>urn:sha1:e1dde2f5a4ef4a0e91a67adebb7037bbfbcb0c50</id>
<content type='text'>
Update kcpuid's CSV file to version v2.0, as generated by x86-cpuid-db.

Summary of the v2.0 changes:

* Introduce the leaves:

  - Leaf 0x00000003, Transmeta Processor serial number
  - Leaf 0x80860000, Transmeta max leaf number + CPU vendor ID
  - Leaf 0x80860001, Transmeta extended CPU information
  - Leaf 0x80860002, Transmeta Code Morphing Software (CMS) enumeration
  - Leaf 0x80860003 =&gt; 0x80860006, Transmeta CPU information string
  - Leaf 0x80860007, Transmeta "live" CPU information
  - Leaf 0xc0000000, Centaur/Zhaoxin's max leaf number
  - Leaf 0xc0000001, Centaur/Zhaoxin's extended CPU features

* Add a 0x prefix for leaves 0x0 to 0x9.  This maintains consistency with
  the rest of the CSV entries.

* Add the new bitfields:

  - Leaf 0x7: nmi_src, NMI-source reporting
  - Leaf 0x80000001: e_base_type and e_mmx (Transmeta)

* Update the section headers for leaves 0x80000000 and 0x80000005 to
  indicate that they are also valid for Transmeta.

Notes:
    Leaf 0x3, being not unique to Transmeta, is handled at the generated
    CSV file v2.3 update, later in this patch queue.

    Leaf 0x80000001 EDX:23 bit, e_mmx, is also available on AMD.  A bugfix
    is already merged at x86-cpuid-db's -tip for that, and it will be part
    of the project's upcoming v2.4 release.:

        https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/commit/65fff25daa41

Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://gitlab.com/x86-cpuid.org/x86-cpuid-db/-/blob/v2.0/CHANGELOG.rst
Link: https://lore.kernel.org/r/20250324142042.29010-17-darwi@linutronix.de
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Define Transmeta and Centaur index ranges</title>
<updated>2025-03-25T08:53:46Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=87669e74d8481a066eb8d319cef7b2ea93d4e24b'/>
<id>urn:sha1:87669e74d8481a066eb8d319cef7b2ea93d4e24b</id>
<content type='text'>
Explicitly define the CPUID index ranges for Transmeta (0x80860000) and
Centaur/Zhaoxin (0xc0000000).

Without these explicit definitions, their respective CPUID indices would
be skipped during CSV bitfield parsing.

Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lore.kernel.org/r/20250324142042.29010-16-darwi@linutronix.de
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Filter valid CPUID ranges</title>
<updated>2025-03-25T08:53:46Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=72383c8274edf0a1736973462603dcfd0a088bb9'/>
<id>urn:sha1:72383c8274edf0a1736973462603dcfd0a088bb9</id>
<content type='text'>
Next commits will introduce vendor-specific CPUID ranges like Transmeta's
0x8086000 range and Centaur's 0xc0000000.

Initially explicit vendor detection was implemented, but it turned out to
be not strictly necessary.  As Dave Hansen noted, even established tools
like cpuid(1) just tries all ranges indices, and see if the CPU responds
back with something sensible.

Do something similar at setup_cpuid_range().  Query the range's index,
and check the maximum range function value returned.  If it's within an
expected interval of [range_index, range_index + MAX_RANGE_INDEX_OFFSET],
accept the range as valid and further query its leaves.

Set MAX_RANGE_INDEX_OFFSET to a heuristic of 0xff.  That should be
sensible enough since all the ranges covered by x86-cpuid-db XML database
are:

	0x00000000	0x00000023
	0x40000000	0x40000000
	0x80000000	0x80000026
	0x80860000	0x80860007
	0xc0000000	0xc0000001

At setup_cpuid_range(), if the range's returned maximum function was not
sane, mark it as invalid by setting its number of leaves, range-&gt;nr, to
zero.

Introduce the for_each_valid_cpuid_range() iterator instead of sprinkling
"range-&gt;nr != 0" checks throughout the code.

Suggested-by: Dave Hansen &lt;dave.hansen@intel.com&gt;
Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lore.kernel.org/r/20250324142042.29010-15-darwi@linutronix.de
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Consolidate index validity checks</title>
<updated>2025-03-25T08:53:46Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=74d29127f83042500c20c903dd67151dbdd86ec8'/>
<id>urn:sha1:74d29127f83042500c20c903dd67151dbdd86ec8</id>
<content type='text'>
Let index_to_cpuid_range() return a CPUID range only if the passed index
is within a CPUID range's maximum supported function on the CPU.
Returning a CPUID range that is invalid on the CPU for the passed index
does not make sense.

This also avoids repeating the "function index is within CPUID range"
checks, both at setup_cpuid_range() and index_to_func().

Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lore.kernel.org/r/20250324142042.29010-14-darwi@linutronix.de
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Extend CPUID index mask macro</title>
<updated>2025-03-25T08:53:46Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f2e2efe9489d883fdaac8b7b46bd669b6214b1cb'/>
<id>urn:sha1:f2e2efe9489d883fdaac8b7b46bd669b6214b1cb</id>
<content type='text'>
Extend the CPUID index mask macro from 0x80000000 to 0xffff0000.  This
accommodates the Transmeta (0x80860000) and Centaur (0xc0000000) index
ranges which will be later added.

This also automatically sets CPUID_FUNCTION_MASK to 0x0000ffff, which is
the actual correct value.  Use that macro, instead of the 0xffff literal
where appropriate.

Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lore.kernel.org/r/20250324142042.29010-13-darwi@linutronix.de
</content>
</entry>
<entry>
<title>tools/x86/kcpuid: Refactor CPUID range handling for future expansion</title>
<updated>2025-03-25T08:53:46Z</updated>
<author>
<name>Ahmed S. Darwish</name>
<email>darwi@linutronix.de</email>
</author>
<published>2025-03-24T14:20:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3151ec059dd1e71761f3beccc1e5f5c18fac4afa'/>
<id>urn:sha1:3151ec059dd1e71761f3beccc1e5f5c18fac4afa</id>
<content type='text'>
The kcpuid code assumes only two CPUID index ranges, standard (0x0...)
and extended (0x80000000...).

Since additional CPUID index ranges will be added in further commits,
replace the "is_ext" boolean with enumeration-based range classification.

Collect all CPUID ranges in a structured array and introduce helper
macros to iterate over it.  Use such helpers throughout the code.

Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: H. Peter Anvin &lt;hpa@zytor.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Josh Poimboeuf &lt;jpoimboe@redhat.com&gt;
Link: https://lore.kernel.org/r/20250324142042.29010-12-darwi@linutronix.de
</content>
</entry>
</feed>
