x86/CPU: extend is_forced_cpu_cap()'s "reach"

"cpuid=no-rdrand" cannot actually be used to suppress the respective
boot warning on certain AMD hardware. That's because cleared_caps[] are
only applied after the ->c_init() hooks ran, i.e. cpu_has() still
returns true in init_amd().

Fixes: 93401e28a8 ("x86: clear RDRAND CPUID bit on AMD family 15h/16h")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: f09f2e28a9
master date: 2026-01-22 09:10:10 +0100
This commit is contained in:
Jan Beulich committed 2026-01-29 13:44:30 +01:00
1 parent 36bea77903
commit 2e5aae39cd
1 file changed
+1 -1
+1 -1
View File
@@ -103,7 +103,7 @@ void __init setup_force_cpu_cap(unsigned int cap)
bool __init is_forced_cpu_cap(unsigned int cap)
{
return test_bit(cap, forced_caps);
return test_bit(cap, forced_caps) || test_bit(cap, cleared_caps);
}
static void cf_check default_init(struct cpuinfo_x86 * c)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.