1
0
Fork 0
alistair23-linux/arch/x86
Paolo Bonzini 7cb6087b45 KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits
[ Upstream commit 39485ed95d ]

Until commit e7c587da12 ("x86/speculation: Use synthetic bits for
IBRS/IBPB/STIBP"), KVM was testing both Intel and AMD CPUID bits before
allowing the guest to write MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD.
Testing only Intel bits on VMX processors, or only AMD bits on SVM
processors, fails if the guests are created with the "opposite" vendor
as the host.

While at it, also tweak the host CPU check to use the vendor-agnostic
feature bit X86_FEATURE_IBPB, since we only care about the availability
of the MSR on the host here and not about specific CPUID bits.

Fixes: e7c587da12 ("x86/speculation: Use synthetic bits for IBRS/IBPB/STIBP")
Cc: stable@vger.kernel.org
Reported-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-01-06 14:48:36 +01:00
..
boot x86/asm: Replace __force_order with a memory clobber 2020-10-29 09:58:01 +01:00
configs vgacon: remove software scrollback support 2020-09-17 13:47:54 +02:00
crypto crypto: x86/crc32c - fix building with clang ias 2020-11-01 12:01:06 +01:00
entry x86/unwind/orc: Fix premature unwind stoppage due to IRET frames 2020-05-14 07:58:29 +02:00
events perf/x86/intel: Fix rtm_abort_event encoding on Ice Lake 2020-12-30 11:51:35 +01:00
hyperv x86/Hyper-V: Report crash data in die() when panic_on_oops is set 2020-04-23 10:36:24 +02:00
ia32 syscalls/x86: Use COMPAT_SYSCALL_DEFINE0 for IA32 (rt_)sigreturn 2020-01-17 19:48:30 +01:00
include x86/CPU/AMD: Save AMD NodeId as cpu_die_id 2020-12-30 11:51:47 +01:00
kernel x86/CPU/AMD: Save AMD NodeId as cpu_die_id 2020-12-30 11:51:47 +01:00
kvm KVM: x86: reinstate vendor-agnostic check on SPEC_CTRL cpuid bits 2021-01-06 14:48:36 +01:00
lib x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S 2020-12-16 10:56:55 +01:00
math-emu x86: math-emu: Fix up 'cmp' insn for clang ias 2020-07-29 10:18:40 +02:00
mm x86/mm/ident_map: Check for errors from ident_pud_init() 2020-12-30 11:51:02 +01:00
net bpf, x86: Fix encoding for lower 8-bit registers in BPF_STX BPF_B 2020-05-02 08:48:55 +02:00
oprofile
pci x86/PCI: Fix intel_mid_pci.c build error when ACPI is not enabled 2020-11-01 12:01:02 +01:00
platform efi/x86: Free efi_pgd with free_pages() 2020-11-24 13:29:19 +01:00
power Merge branch 'x86-apic-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-09-17 12:04:39 -07:00
purgatory x86/purgatory: Disable various profiling and sanitizing options 2020-06-24 17:50:20 +02:00
ras RAS/CEC: Add CONFIG_RAS_CEC_DEBUG and move CEC debug features there 2019-06-08 17:39:24 +02:00
realmode x86/kdump: Always reserve the low 1M when the crashkernel option is specified 2020-10-01 13:17:18 +02:00
tools x86/insn: Fix awk regexp warnings 2019-11-29 10:09:45 +01:00
um um: Implement copy_thread_tls 2020-01-14 20:08:35 +01:00
video treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
xen x86/xen: don't unbind uninitialized lock_kicker_irq 2020-12-02 08:49:48 +01:00
.gitignore
Kbuild treewide: Add SPDX license identifier - Kbuild 2019-05-30 11:32:33 -07:00
Kconfig x86/tsx: Add config options to set tsx=on|off|auto 2019-10-28 09:12:18 +01:00
Kconfig.cpu x86/cpu: Create Zhaoxin processors architecture support file 2019-06-22 11:45:57 +02:00
Kconfig.debug x86, perf: Fix the dependency of the x86 insn decoder selftest 2019-09-02 20:05:58 +02:00
Makefile x86/build: Add -Wnoaddress-of-packed-member to REALMODE_CFLAGS, to silence GCC9 build warning 2019-08-28 17:31:31 +02:00
Makefile.um x86, powerpc: Remove -funit-at-a-time compiler option entirely 2018-12-09 11:55:32 +01:00
Makefile_32.cpu