x86: Expose more MSR_ARCH_CAPS to hwdom
authorJason Andryuk <jandryuk@gmail.com>
Mon, 15 Aug 2022 13:32:31 +0000 (15:32 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 15 Aug 2022 13:32:31 +0000 (15:32 +0200)
commit2a362668cb4ad9a0784c4592968f881d7746ec0f
treedc4c21683833c4977cfad0f0cd624b6c3071302f
parent4e351880f68e50fe1479c36a30e0e4e03d160c34
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>
master commit: e83cd54611fec5b7a539fa1281a14319143490e6
master date: 2022-08-09 16:35:25 +0100
xen/arch/x86/msr.c
xen/include/asm-x86/msr-index.h