kernel_samsung_a53x/arch/x86/kvm
Pawan Gupta 1ef6cf50fc KVM/VMX: Move VERW closer to VMentry for MDS mitigation
commit 43fb862de8f628c5db5e96831c915b9aebf62d33 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.

  [ pawan: conflict resolved in backport ]

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-11-19 09:22:40 +01:00
..
mmu KVM: use __vcalloc for very large allocations 2024-11-18 12:12:59 +01:00
svm KVM: SVM: Flush pages under kvm->lock to fix UAF in svm_register_enc_region() 2024-11-19 09:22:38 +01:00
vmx KVM/VMX: Move VERW closer to VMentry for MDS mitigation 2024-11-19 09:22:40 +01:00
cpuid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpuid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
emulate.c x86: Share definition of __is_canonical_address() 2024-11-18 11:43:11 +01:00
hyperv.c KVM: x86: hyper-v: Don't auto-enable stimer on write from user-space 2024-11-18 11:43:21 +01:00
hyperv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i8254.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i8254.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
i8259.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ioapic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ioapic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq_comm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_cache_regs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm_emulate.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lapic.c KVM: x86: Mask LVTPC when handling a PMI 2024-11-08 11:26:08 +01:00
lapic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mtrr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tss.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
x86.c KVM: use __vcalloc for very large allocations 2024-11-18 12:12:59 +01:00
x86.h x86: Share definition of __is_canonical_address() 2024-11-18 11:43:11 +01:00