x86/srso: Add SRSO_NO support
Upstream commit: 1b5277c0ea0b247393a9c426769fde18cff5e2f6 Add support for the CPUID flag which denotes that the CPU is not affected by SRSO. Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
df76a59feb
commit
e47af0c255
@@ -1286,14 +1286,14 @@ bool cpu_has_ibpb_brtype_microcode(void)
|
||||
{
|
||||
u8 fam = boot_cpu_data.x86;
|
||||
|
||||
if (fam == 0x17) {
|
||||
/* Zen1/2 IBPB flushes branch type predictions too. */
|
||||
/* Zen1/2 IBPB flushes branch type predictions too. */
|
||||
if (fam == 0x17)
|
||||
return boot_cpu_has(X86_FEATURE_AMD_IBPB);
|
||||
} else if (fam == 0x19) {
|
||||
/* Poke the MSR bit on Zen3/4 to check its presence. */
|
||||
else if (fam == 0x19)
|
||||
return !wrmsrl_safe(MSR_IA32_PRED_CMD, PRED_CMD_SBPB);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void zenbleed_check_cpu(void *unused)
|
||||
|
Reference in New Issue
Block a user