x86/splitlock: CPUID and MSR details
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 23 Dec 2019 14:10:29 +0000 (14:10 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 21 Feb 2020 13:50:00 +0000 (13:50 +0000)
commit744807bdb02e49c5c79082118ef24e93b94cf158
treeb3cf3e50761ede132a58a0f32eabcf522883bdb1
parentc1739b8ccdecce663e1c07f21290e3e48c33e699
x86/splitlock: CPUID and MSR details

A splitlock is an atomic operation which crosses a cache line boundary.  It
serialises operations in the cache coherency fabric and comes with a
multi-thousand cycle stall.

Intel Tremont CPUs introduce MSR_CORE_CAPS to enumerate various core-specific
features, and MSR_TEST_CTRL to adjust the behaviour in the case of a
splitlock.

Virtualising this for guests is distinctly tricky owing to the fact that
MSR_TEST_CTRL has core rather than thread scope.  In the meantime however,
prevent the MSR values leaking into guests.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Liu <wl@xen.org>
tools/libxl/libxl_cpuid.c
tools/misc/xen-cpuid.c
xen/arch/x86/msr.c
xen/include/asm-x86/msr-index.h
xen/include/public/arch-x86/cpufeatureset.h