]> git.baikalelectronics.ru Git - kernel.git/commit
x86/KVM/VMX: Add L1D flush algorithm
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 2 Jul 2018 10:47:38 +0000 (12:47 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 4 Jul 2018 18:49:38 +0000 (20:49 +0200)
commit16ad9c72e15f190afd13499de18958d9f0c1f4fb
treed63eac82760e1c3f71bc300ae0cbaade92c8c0c7
parentec76111d15f2a02a45807d6e2e651a873520e052
x86/KVM/VMX: Add L1D flush algorithm

To mitigate the L1 Terminal Fault vulnerability it's required to flush L1D
on VMENTER to prevent rogue guests from snooping host memory.

CPUs will have a new control MSR via a microcode update to flush L1D with a
single MSR write, but in the absence of microcode a fallback to a software
based flush algorithm is required.

Add a software flush loop which is based on code from Intel.

[ tglx: Split out from combo patch ]
[ bpetkov: Polish the asm code ]

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kvm/vmx.c