Re: [PATCH 2/2] x86/rdrand: hide RDRAND and RDSEED from CPUID in case of a malfunction

From: Mikhail Paulyshka
Date: Wed Mar 12 2025 - 09:36:23 EST


On 3/12/25 3:45 PM, Borislav Petkov wrote:
On Wed, Mar 12, 2025 at 03:31:30PM +0300, Mikhail Paulyshka wrote:
@@ -46,6 +47,8 @@ void x86_init_rdrand(struct cpuinfo_x86 *c)
if (failure) {
clear_cpu_cap(c, X86_FEATURE_RDRAND);
+ if (c->x86_vendor == X86_VENDOR_AMD || c->x86_vendor == X86_VENDOR_HYGON)
Hygon is family 0x18. Have you tested it there?

My bad, I thought Hygon is backwards compatible with AMD Zen1/2. Then it can be removed in case Hygon's MSRs are different.