Files
linux/arch/x86/include/asm
Pawan Gupta 59d665a709 KVM: x86/speculation: Disable Fill buffer clear within guests
commit 027bbb884b upstream

The enumeration of MD_CLEAR in CPUID(EAX=7,ECX=0).EDX{bit 10} is not an
accurate indicator on all CPUs of whether the VERW instruction will
overwrite fill buffers. FB_CLEAR enumeration in
IA32_ARCH_CAPABILITIES{bit 17} covers the case of CPUs that are not
vulnerable to MDS/TAA, indicating that microcode does overwrite fill
buffers.

Guests running in VMM environments may not be aware of all the
capabilities/vulnerabilities of the host CPU. Specifically, a guest may
apply MDS/TAA mitigations when a virtual CPU is enumerated as vulnerable
to MDS/TAA even when the physical CPU is not. On CPUs that enumerate
FB_CLEAR_CTRL the VMM may set FB_CLEAR_DIS to skip overwriting of fill
buffers by the VERW instruction. This is done by setting FB_CLEAR_DIS
during VMENTER and resetting on VMEXIT. For guests that enumerate
FB_CLEAR (explicitly asking for fill buffer clear capability) the VMM
will not use FB_CLEAR_DIS.

Irrespective of guest state, host overwrites CPU buffers before VMENTER
to protect itself from an MMIO capable guest, as part of mitigation for
MMIO Stale Data vulnerabilities.

Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-06-16 13:30:34 +02:00
..
2021-03-18 15:31:53 +01:00
2020-01-23 10:41:20 -08:00
2021-03-18 15:31:53 +01:00
2020-05-07 16:06:20 +02:00
2020-10-28 20:26:25 +01:00
2021-03-31 16:20:22 +02:00
2020-11-26 12:58:56 +01:00
2019-04-16 12:26:18 +02:00
2021-03-18 15:31:53 +01:00
2020-11-06 23:14:58 +01:00
2022-04-13 20:59:13 +02:00
2021-05-12 14:54:56 +02:00
2020-09-16 16:52:28 +02:00
2021-06-22 13:56:43 +02:00
2021-07-01 11:06:03 -07:00
2021-03-15 10:49:00 +01:00
2021-05-12 20:00:51 +02:00
2018-03-20 10:01:57 +01:00
2019-04-10 09:53:31 +02:00
2020-03-21 16:03:25 +01:00
2020-11-17 14:36:13 +01:00
2020-03-23 18:45:14 +01:00
2020-01-14 12:20:58 +01:00