linux/arch
Tom Lendacky 5122e0e443 KVM: x86: Mitigate the cross-thread return address predictions bug
commit 6f0f2d5ef8 upstream.

By default, KVM/SVM will intercept attempts by the guest to transition
out of C0. However, the KVM_CAP_X86_DISABLE_EXITS capability can be used
by a VMM to change this behavior. To mitigate the cross-thread return
address predictions bug (X86_BUG_SMT_RSB), a VMM must not be allowed to
override the default behavior to intercept C0 transitions.

Use a module parameter to control the mitigation on processors that are
vulnerable to X86_BUG_SMT_RSB. If the processor is vulnerable to the
X86_BUG_SMT_RSB bug and the module parameter is set to mitigate the bug,
KVM will not allow the disabling of the HLT, MWAIT and CSTATE exits.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Message-Id: <4019348b5e07148eb4d593380a5f6713b93c9a16.1675956146.git.thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2023-02-14 19:18:05 +01:00
..
alpha exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
arc arc: iounmap() arg is volatile 2022-11-03 23:59:15 +09:00
arm ARM: dts: vf610: Fix pca9548 i2c-mux node names 2023-02-06 07:58:59 +01:00
arm64 arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive 2023-02-14 19:18:04 +01:00
csky csky: Fix function name in csky_alignment() and die() 2023-02-01 08:27:21 +01:00
h8300 h8300: Fix build errors from do_exit() to make_task_dead() transition 2023-02-01 08:27:21 +01:00
hexagon hexagon: Fix function name in die() 2023-02-01 08:27:20 +01:00
ia64 ia64: make IA64_MCA_RECOVERY bool instead of tristate 2023-02-01 08:27:21 +01:00
m68k exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
microblaze exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
mips exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
nds32 exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
nios2 exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
openrisc exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
parisc parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case 2023-02-09 11:26:44 +01:00
powerpc powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch 2023-02-14 19:18:03 +01:00
riscv riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte 2023-02-14 19:18:03 +01:00
s390 exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
sh exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
sparc exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 12:34:23 +02:00
x86 KVM: x86: Mitigate the cross-thread return address predictions bug 2023-02-14 19:18:05 +01:00
xtensa exit: Add and use make_task_dead. 2023-02-01 08:27:20 +01:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
Kconfig arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic 2022-08-17 14:23:00 +02:00