[PATCH v6 40/90] x86/cpuid: Parse CPUID(0x80000005), CPUID(0x80000006), CPUID(0x80000008)
From: Ahmed S. Darwish
Date: Thu Mar 26 2026 - 22:44:06 EST
Parse AMD cacheinfo CPUID(0x80000005) and CPUID(0x80000006).
Also parse the CPU capacity parameters at CPUID(0x80000008).
This allows converting their call sites to parsed CPUID access instead of
issuing CPUID queries.
Signed-off-by: Ahmed S. Darwish <darwi@xxxxxxxxxxxxx>
---
arch/x86/include/asm/cpuid/types.h | 3 +++
arch/x86/kernel/cpu/cpuid_parser.h | 3 +++
2 files changed, 6 insertions(+)
diff --git a/arch/x86/include/asm/cpuid/types.h b/arch/x86/include/asm/cpuid/types.h
index f77659303569..f50e54bfb514 100644
--- a/arch/x86/include/asm/cpuid/types.h
+++ b/arch/x86/include/asm/cpuid/types.h
@@ -217,6 +217,9 @@ struct cpuid_leaves {
CPUID_LEAF ( 0x80000002, 0 );
CPUID_LEAF ( 0x80000003, 0 );
CPUID_LEAF ( 0x80000004, 0 );
+ CPUID_LEAF ( 0x80000005, 0 );
+ CPUID_LEAF ( 0x80000006, 0 );
+ CPUID_LEAF ( 0x80000008, 0 );
CPUID_LEAF_N ( 0x8000001d, 8 );
CPUID_LEAF ( 0x80860000, 0 );
CPUID_LEAF ( 0x80860001, 0 );
diff --git a/arch/x86/kernel/cpu/cpuid_parser.h b/arch/x86/kernel/cpu/cpuid_parser.h
index 25ca9b19e8cf..ab391de03a92 100644
--- a/arch/x86/kernel/cpu/cpuid_parser.h
+++ b/arch/x86/kernel/cpu/cpuid_parser.h
@@ -151,6 +151,9 @@ struct cpuid_parse_entry {
CPUID_PARSE_ENTRY ( 0x80000002, 0, generic ), \
CPUID_PARSE_ENTRY ( 0x80000003, 0, generic ), \
CPUID_PARSE_ENTRY ( 0x80000004, 0, generic ), \
+ CPUID_PARSE_ENTRY ( 0x80000005, 0, generic ), \
+ CPUID_PARSE_ENTRY ( 0x80000006, 0, generic ), \
+ CPUID_PARSE_ENTRY ( 0x80000008, 0, generic ), \
CPUID_PARSE_ENTRY_N ( 0x8000001d, deterministic_cache ), \
CPUID_PARSE_ENTRY ( 0x80860000, 0, 0x80860000 ), \
CPUID_PARSE_ENTRY ( 0x80860001, 0, generic ), \
--
2.53.0