x86: Expose more MSR_ARCH_CAPS to hwdom
authorJason Andryuk <jandryuk@gmail.com>
Tue, 19 Jul 2022 20:08:15 +0000 (16:08 -0400)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 9 Aug 2022 15:35:25 +0000 (16:35 +0100)
commite83cd54611fec5b7a539fa1281a14319143490e6
tree588d95051ed3c0f83fc15efd5b46598e803909fc
parent3caa5a3f03eef4ce7f010aea3af09bb8afde4298
x86: Expose more MSR_ARCH_CAPS to hwdom

commit e46474278a0e ("x86/intel: Expose MSR_ARCH_CAPS to dom0") started
exposing MSR_ARCH_CAPS to dom0.  More bits in MSR_ARCH_CAPS have since
been defined, but they haven't been exposed.  Update the list to allow
them through.

As one example, this allows a Linux Dom0 to know that it has the
appropriate microcode via FB_CLEAR.  Notably, and with the updated
microcode, this changes dom0's
/sys/devices/system/cpu/vulnerabilities/mmio_stale_data changes from:

  "Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown"

to:

  "Mitigation: Clear CPU buffers; SMT Host state unknown"

This exposes the MMIO Stale Data and Intel Branch History Injection
(BHI) controls as well as the page size change MCE issue bit.

Fixes: commit 2ebe8fe9b7e0 ("x86/spec-ctrl: Enumeration for MMIO Stale Data controls")
Fixes: commit cea9ae062295 ("x86/spec-ctrl: Enumeration for new Intel BHI controls")
Fixes: commit 59e89cdabc71 ("x86/vtx: Disable executable EPT superpages to work around CVE-2018-12207")
Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/msr.c