Skip to content
Commit 5a15d834 authored by Borislav Petkov (AMD)'s avatar Borislav Petkov (AMD)
Browse files

x86/srso: Tie SBPB bit setting to microcode patch detection



The SBPB bit in MSR_IA32_PRED_CMD is supported only after a microcode
patch has been applied so set X86_FEATURE_SBPB only then. Otherwise,
guests would attempt to set that bit and #GP on the MSR write.

While at it, make SMT detection more robust as some guests - depending
on how and what CPUID leafs their report - lead to cpu_smt_control
getting set to CPU_SMT_NOT_SUPPORTED but SRSO_NO should be set for any
guest incarnation where one simply cannot do SMT, for whatever reason.

Fixes: fb3bd914 ("x86/srso: Add a Speculative RAS Overflow mitigation")
Reported-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reported-by: default avatarSalvatore Bonaccorso <carnil@debian.org>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
parent 3bbbe97a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment