mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ahmed S. Darwish" <darwi@linutronix.de>
To: Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, x86-cpuid@lists.linux.dev
Cc: Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org,
	"Ahmed S. Darwish" <darwi@linutronix.de>
Subject: [PATCH v1 0/9] tools/x86/kcpuid: Complete the CPUID database
Date: Thu, 18 Jul 2024 15:47:40 +0200	[thread overview]
Message-ID: <20240718134755.378115-1-darwi@linutronix.de> (raw)
In-Reply-To: <ZpkckA2SHa1r3Bor@lx-t490>

Hi,

This patch series enhances the Linux Kernel's kcpuid tool with full
cpuid leaves bitfields coverage through a CSV file generated from:

   https://gitlab.com/x86-cpuid.org/x86-cpuid-db

The existing CSV file covers 291 cpuid bitfield entries, while the new
generated one in this patch series covers 835+ entries with full
descriptions.

The new file also covers having the same bitfields' format repeated
across a number of subleaves.  This is encountered while enumerating
hierarchical CPU structures like cache, TLB, and CPU topology levels.

The generated file has the following blurb automatically added:

   # SPDX-License-Identifier: CC0-1.0
   # Generator: x86-cpuid-db v1.0

where the generator tag includes the x86-cpuid-db project's workspace
"git describe" string.  This is intended for projects like KernelCI, to
aid in verifying that the generated files have not been tampered with.

There's also a hint for future contributors:

   # Auto-generated file
   # Please submit all updates and bugfixes to https://x86-cpuid.org

We kindly expect the x86 tree maintainers to guide developers so that
any bugfixes or enhancements to the CSV file are to be submitted
directly to x86-cpuid.org upstream, thus benefiting the whole ecosystem.

Beside reading the actual new CSV file before and after, a nice
demonstration would be to run the command below:

   kcpuid --detail --all

and to compare the output accordingly.  The differences get even bigger
when running the above on the more featureful x86 CPUs; Xeon and Zen.

The first set of patches in this series are kcpuid bugfixes and
refactorings.  Afterwards, cpuid enumeration support for hierarchical CPU
structures is added.  Then, the auto-generated CSV file is introduced.

Thanks!

8<-----

Ahmed S. Darwish (9):
  tools/x86/kcpuid: Remove unused variable
  tools/x86/kcpuid: Properly align long-description columns
  tools/x86/kcpuid: Set max possible subleaves count to 64
  tools/x86/kcpuid: Protect against faulty "max subleaf" values
  tools/x86/kcpuid: Strip bitfield names leading/trailing whitespace
  tools/x86/kcpuid: Recognize all leaves with subleaves
  tools/x86/kcpuid: Parse subleaf ranges if provided
  tools/x86/kcpuid: Introduce a complete cpuid bitfields CSV file
  MAINTAINERS: Add x86 cpuid database entry

 MAINTAINERS                     |   10 +
 tools/arch/x86/kcpuid/cpuid.csv | 1430 ++++++++++++++++++++++---------
 tools/arch/x86/kcpuid/kcpuid.c  |  105 +--
 3 files changed, 1083 insertions(+), 462 deletions(-)

base-commit: 0c3836482481200ead7b416ca80c68a29cfdaabd
--
2.45.2

  reply	other threads:[~2024-07-18 13:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 13:45 [ANNOUNCE] x86-cpuid.org: A machine-readable CPUID repository Ahmed S. Darwish
2024-07-18 13:47 ` Ahmed S. Darwish [this message]
2024-07-18 13:47   ` [PATCH v1 1/9] tools/x86/kcpuid: Remove unused variable Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for Ahmed S. Darwish
2024-07-18 13:47   ` [PATCH v1 2/9] tools/x86/kcpuid: Properly align long-description columns Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for Ahmed S. Darwish
2024-07-18 13:47   ` [PATCH v1 3/9] tools/x86/kcpuid: Set max possible subleaves count to 64 Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for Ahmed S. Darwish
2024-07-18 13:47   ` [PATCH v1 4/9] tools/x86/kcpuid: Protect against faulty "max subleaf" values Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for Ahmed S. Darwish
2024-07-18 13:47   ` [PATCH v1 5/9] tools/x86/kcpuid: Strip bitfield names leading/trailing whitespace Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for Ahmed S. Darwish
2024-07-18 13:47   ` [PATCH v1 6/9] tools/x86/kcpuid: Recognize all leaves with subleaves Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for Ahmed S. Darwish
2024-07-18 13:47   ` [PATCH v1 7/9] tools/x86/kcpuid: Parse subleaf ranges if provided Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for Ahmed S. Darwish
2024-07-18 13:47   ` [PATCH v1 8/9] tools/x86/kcpuid: Introduce a complete cpuid bitfields CSV file Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for Ahmed S. Darwish
2024-07-18 13:47   ` [PATCH v1 9/9] MAINTAINERS: Add x86 cpuid database entry Ahmed S. Darwish
2024-08-02  7:28     ` [tip: x86/misc] " tip-bot2 for 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=20240718134755.378115-1-darwi@linutronix.de \
    --to=darwi@linutronix.de \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --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

all inboxes | Powered by JetHome®