gz / rust-cpuid

cpuid library in rust.
https://docs.rs/raw-cpuid/
MIT License
150 stars 45 forks source link

Implement Intel leaf 0x1F (Extended Topology Information V2) #94

Closed semiviral closed 2 years ago

semiviral commented 2 years ago

Simple implementation for the 2nd iteration of the extended topology leaf.

gz commented 2 years ago

Hi, many thanks for submitting this PR!

Looks good to me aside from some minor comments and need to make sure tests pass. It seems like tests fail because the two CPUs we have in the tests don't have support for this leaf. If true, then we should change the test to ensure that the leaf isn't supported and maybe we can find a CPUID dump of a cpu that supports it and add this test in a new CPU model. e.g., this is one that supports 1f it seems: http://users.atw.hu/instlatx64/GenuineIntel/GenuineIntel0090672_AlderLake_BC_AVX512_CPUID01.txt

(Or if you have a CPU that supports this feature feel free to add that CPUID dump as a new model instead)

semiviral commented 2 years ago

I'm currently running on an i7 12700k, which also supports the 0x1F leaf. I've gone ahead and added the CPU as a test model, as well as adding the (ostensibly new?) LoadOnly and StoreOnly values for DatType.

Additionally, I've gone ahead fixed the unsupported tests / leaves from the existing Xeon Gold and Ryzen Matisse CPU models.

gz commented 2 years ago

Awesome, thanks for all the work!

gz commented 2 years ago

Released as 10.4 on crates.io!