linux-stable/arch
Thomas Lendacky 9c15bda922 x86/speculation: Add support for STIBP always-on preferred mode
[ Upstream commit 20c3a2c33e ]

Different AMD processors may have different implementations of STIBP.
When STIBP is conditionally enabled, some implementations would benefit
from having STIBP always on instead of toggling the STIBP bit through MSR
writes. This preference is advertised through a CPUID feature bit.

When conditional STIBP support is requested at boot and the CPU advertises
STIBP always-on mode as preferred, switch to STIBP "on" support. To show
that this transition has occurred, create a new spectre_v2_user_mitigation
value and a new spectre_v2_user_strings message. The new mitigation value
is used in spectre_v2_user_select_mitigation() to print the new mitigation
message as well as to return a new string from stibp_state().

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Link: https://lkml.kernel.org/r/20181213230352.6937.74943.stgit@tlendack-t1.amdoffice.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-22 09:05:04 +02:00
..
alpha Fix 'acccess_ok()' on alpha and SH 2020-06-22 09:04:58 +02:00
arc ARC: [plat-eznps]: Restrict to CONFIG_ISA_ARCOMPACT 2020-06-07 13:17:55 +02:00
arm ARM: 8977/1: ptrace: Fix mask for thumb breakpoint hook 2020-06-22 09:04:59 +02:00
arm64 arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node 2020-06-03 08:19:27 +02:00
c6x
h8300
hexagon hexagon: define ioremap_uc 2020-05-10 10:30:11 +02:00
ia64 mm/memory_hotplug: shrink zones when offlining memory 2020-01-29 16:43:27 +01:00
m68k m68k: Call timer_interrupt() with interrupts disabled 2020-01-27 14:51:23 +01:00
microblaze microblaze: Prevent the overflow of the start 2020-02-24 08:34:53 +01:00
mips MIPS: OCTEON: irq: Fix potential NULL pointer dereference 2020-04-17 10:48:47 +02:00
nds32 nds32: Fix the items of hwcap_str ordering issue. 2019-12-13 08:51:35 +01:00
nios2 nios2: ksyms: Add missing symbol exports 2020-01-27 14:50:30 +01:00
openrisc arch/openrisc: Fix issues with access_ok() 2020-06-22 09:04:59 +02:00
parisc parisc: Fix kernel panic in mem_init() 2020-06-03 08:19:42 +02:00
powerpc powerpc/xive: Clear the page tables for the ESB IO mapping 2020-06-22 09:05:00 +02:00
riscv riscv: stacktrace: Fix undefined reference to `walk_stackframe' 2020-06-03 08:19:30 +02:00
s390 s390/mm: fix set_huge_pte_at() for empty ptes 2020-06-07 13:17:56 +02:00
sh Fix 'acccess_ok()' on alpha and SH 2020-06-22 09:04:58 +02:00
sparc sparc: Add .exit.data section. 2020-02-24 08:34:37 +01:00
um um: ubd: Prevent buffer overrun on command completion 2020-04-23 10:30:19 +02:00
unicore32
x86 x86/speculation: Add support for STIBP always-on preferred mode 2020-06-22 09:05:04 +02:00
xtensa xtensa: fix TLB sanity checker 2019-12-21 10:57:25 +01:00
.gitignore
Kconfig