Re: [PATCH 0/9] Add CPU-type to topology

From: Brice Goglin
Date: Tue Jun 18 2024 - 09:27:59 EST


Le 17/06/2024 à 11:11, Pawan Gupta a écrit :
Hi,

This series adds support for CPU-type (CPUID.1A.EAX[31-24] on Intel) to
differentiate between hybrid variants P+E, P-only, E-only that share the
same Family/Model/Stepping. One of the use case for CPU-type is the
affected CPU table for CPU vulnerabilities, which can now use the CPU-type
to filter the unaffected variants.

* Patch 1 adds cpu-type to CPU topology structure and introduces
topology_cpu_type() to get the CPU-type.

* Patch 2-4 replaces usages of get_this_hybrid_cpu_type() with
topology_cpu_type().

* Patch 5-7 Updates CPU-matching infrastructure to use CPU-type.

* Patch 8 cleans up the affected CPU list.

* Patch 9 uses the CPU-type to exclude P-only parts from the RFDS affected
list.


Hello

Is there still a plan to expose this info in sysfs? Userspace currently uses frequencies to guess which cores are E or P. Intel sent some patches several years ago [1], but they got abandoned nowhere as far as I know. There was also some discussion about using a "capacity" field like ARM does, but IIRC Intel didn't like the idea in the end.

Thanks

Brice

[1] https://lkml.org/lkml/2020/10/2/1208