Skip to content

Commit f8a66d6

Browse files
author
Peter Zijlstra
committed
x86,bugs: Unconditionally allow spectre_v2=retpoline,amd
Currently Linux prevents usage of retpoline,amd on !AMD hardware, this is unfriendly and gets in the way of testing. Remove this restriction. Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Reviewed-by: Borislav Petkov <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Tested-by: Alexei Starovoitov <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d4b5a5c commit f8a66d6

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

arch/x86/kernel/cpu/bugs.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -882,13 +882,6 @@ static enum spectre_v2_mitigation_cmd __init spectre_v2_parse_cmdline(void)
882882
return SPECTRE_V2_CMD_AUTO;
883883
}
884884

885-
if (cmd == SPECTRE_V2_CMD_RETPOLINE_AMD &&
886-
boot_cpu_data.x86_vendor != X86_VENDOR_HYGON &&
887-
boot_cpu_data.x86_vendor != X86_VENDOR_AMD) {
888-
pr_err("retpoline,amd selected but CPU is not AMD. Switching to AUTO select\n");
889-
return SPECTRE_V2_CMD_AUTO;
890-
}
891-
892885
spec_v2_print_cond(mitigation_options[i].option,
893886
mitigation_options[i].secure);
894887
return cmd;

0 commit comments

Comments
 (0)