x86/speculation: Use ARCH_CAPABILITIES to skip L1D flush on vmentry
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 5 Aug 2018 14:07:46 +0000 (16:07 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 5 Aug 2018 15:10:19 +0000 (17:10 +0200)
commit8e0b2b916662e09dd4d09e5271cdf214c6b80e62
tree77e5da72764da3c8ead7c72391a369f48adfb606
parentea156d192f5257a5bf393d33910d3b481bf8a401
x86/speculation: Use ARCH_CAPABILITIES to skip L1D flush on vmentry

Bit 3 of ARCH_CAPABILITIES tells a hypervisor that L1D flush on vmentry is
not needed.  Add a new value to enum vmx_l1d_flush_state, which is used
either if there is no L1TF bug at all, or if bit 3 is set in ARCH_CAPABILITIES.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/msr-index.h
arch/x86/include/asm/vmx.h
arch/x86/kernel/cpu/bugs.c
arch/x86/kvm/vmx.c