• Ahmed S. Darwish's avatar
    tools/x86/kcpuid: Recognize all leaves with subleaves · b0a59d14
    Ahmed S. Darwish authored
    cpuid.csv will be extended in further commits with all-publicly-known
    CPUID leaves and bitfields.  Thus, modify has_subleafs() to identify all
    known leaves with subleaves.
    
    Remove the redundant "is_amd" check since all x86 vendors already report
    the maxium supported extended leaf at leaf 0x80000000 EAX register.
    
    The extra mentioned leaves are:
    
      - Leaf 0x12, Intel Software Guard Extensions (SGX) enumeration
      - Leaf 0x14, Intel process trace (PT) enumeration
      - Leaf 0x17, Intel SoC vendor attributes enumeration
      - Leaf 0x1b, Intel PCONFIG (Platform configuration) enumeration
      - Leaf 0x1d, Intel AMX (Advanced Matrix Extensions) tile information
      - Leaf 0x1f, Intel v2 extended topology enumeration
      - Leaf 0x23, Intel ArchPerfmonExt (Architectural PMU ext) enumeration
      - Leaf 0x80000020, AMD Platform QoS extended features enumeration
      - Leaf 0x80000026, AMD v2 extended topology enumeration
    
    Set the 'max_subleaf' variable for all the newly marked leaves with extra
    subleaves.  Ideally, this should be fetched from the CSV file instead,
    but the current kcpuid code architecture has two runs: one run to
    serially invoke the cpuid instructions and save all the output in-memory,
    and one run to parse this in-memory output through the CSV specification.
    Signed-off-by: default avatarAhmed S. Darwish <darwi@linutronix.de>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Link: https://lore.kernel.org/all/20240718134755.378115-7-darwi@linutronix.de
    b0a59d14
kcpuid.c 13.7 KB