rr icon indicating copy to clipboard operation
rr copied to clipboard

Consider kernel patch for AMD CPUID masking feature

Open Keno opened this issue 3 years ago • 1 comments

AMD CPUs have two MSRs (MSRC001_1004 and MSRC001_1005) [1] that allow resetting bits in the 0x1 and 0x8000_0001 CPUID leaves. If this capability were exposed by the kernel, we would be able to mask off problematic cpuid bits (like rdrand - see #3315) as we currently do on Intel CPUs.

Unfortunately, I don't currently have time to push such a patch through upstream submission, but leaving this issue here for any discussion or for somebody else to pick this up.

[1] https://developer.amd.com/wordpress/media/2017/11/54945_PPR_Family_17h_Models_00h-0Fh.pdf

Keno avatar Jul 03 '22 01:07 Keno

I mocked up an appropriate patch here: https://gist.github.com/Keno/bd5b118ffaeca44267db9130853e920a. It's mostly untested, but should provide a starting point if anyone wants to pick this up in the future.

Keno avatar Jul 03 '22 02:07 Keno