linux-stable/arch
Pawan Gupta 5287a535bd KVM/VMX: Move VERW closer to VMentry for MDS mitigation
commit 43fb862de8 upstream.

During VMentry VERW is executed to mitigate MDS. After VERW, any memory
access like register push onto stack may put host data in MDS affected
CPU buffers. A guest can then use MDS to sample host data.

Although likelihood of secrets surviving in registers at current VERW
callsite is less, but it can't be ruled out. Harden the MDS mitigation
by moving the VERW mitigation late in VMentry path.

Note that VERW for MMIO Stale Data mitigation is unchanged because of
the complexity of per-guest conditional VERW which is not easy to handle
that late in asm with no GPRs available. If the CPU is also affected by
MDS, VERW is unconditionally executed late in asm regardless of guest
having MMIO access.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/all/20240213-delay-verw-v8-6-a6216d83edb7%40linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-03-06 14:54:00 +00:00
..
alpha arch: fix asm-offsets.c building with -Wmissing-prototypes 2024-02-05 20:16:47 +00:00
arc work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:51:20 +01:00
arm ARM: ep93xx: Add terminator to gpiod_lookup_table 2024-03-01 13:41:49 +01:00
arm64 crypto: arm64/neonbs - fix out-of-bounds access on short input 2024-03-06 14:53:56 +00:00
csky work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:51:20 +01:00
hexagon
loongarch LoongArch: Update cpu_sibling_map when disabling nonboot CPUs 2024-03-01 13:41:45 +01:00
m68k mm: Introduce flush_cache_vmap_early() 2024-02-16 19:14:25 +01:00
microblaze
mips MIPS: reserve exception vector space ONLY ONCE 2024-03-01 13:41:35 +01:00
nios2 mm: Introduce flush_cache_vmap_early() 2024-02-16 19:14:25 +01:00
openrisc
parisc parisc: Fix stack unwinder 2024-03-01 13:41:55 +01:00
powerpc powerpc/rtas: use correct function name for resetting TCE tables 2024-03-06 14:54:00 +00:00
riscv riscv: Fix enabling cbo.zero when running in M-mode 2024-03-06 14:53:57 +00:00
s390 s390: use the correct count for __iowrite64_copy() 2024-03-01 13:41:57 +01:00
sh mm: Introduce flush_cache_vmap_early() 2024-02-16 19:14:25 +01:00
sparc sparc: Fix undefined reference to fb_is_primary_device 2024-03-01 13:41:47 +01:00
um um: Fix adding '-no-pie' for clang 2024-02-23 09:51:39 +01:00
x86 KVM/VMX: Move VERW closer to VMentry for MDS mitigation 2024-03-06 14:54:00 +00:00
xtensa work around gcc bugs with 'asm goto' with outputs 2024-02-23 09:51:20 +01:00
.gitignore
Kconfig scs: add CONFIG_MMU dependency for vfree_atomic() 2024-02-23 09:51:28 +01:00