tools/x86/kcpuid: Dump the CPUID function in detailed view
authorBorislav Petkov (AMD) <bp@alien8.de>
Mon, 6 Feb 2023 14:18:32 +0000 (08:18 -0600)
committerBorislav Petkov (AMD) <bp@alien8.de>
Tue, 7 Mar 2023 22:35:44 +0000 (23:35 +0100)
commitcd3ad6619517cda3a055d864a85cebbd434dba9a
tree2db05207a8fd537fc1694ba902e4273fae1da4a9
parentce22e4346ff5c2f2ce6b6a43b16d336c5c6df245
tools/x86/kcpuid: Dump the CPUID function in detailed view

Sometimes it is useful to know which CPUID leaf contains the fields so
add it to -d output so that it looks like this:

  CPUID_0x8000001e_ECX[0x0]:
           extended_apic_id       : 0x8           - Extended APIC ID
           core_id                : 0x4           - Identifies the logical core ID
           threads_per_core       : 0x1           - The number of threads per core is threads_per_core + 1
           node_id                : 0x0           - Node ID
           nodes_per_processor    : 0x0           - Nodes per processor { 0: 1 node, else reserved }

  CPUID_0x8000001f_ECX[0x0]:
           sme                 -  Secure Memory Encryption

...

Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Reviewed-by: Feng Tang <feng.tang@intel.com>
Link: https://lore.kernel.org/r/20230206141832.4162264-4-terry.bowman@amd.com
tools/arch/x86/kcpuid/kcpuid.c