]> xenbits.xensource.com Git - xen.git/commit
x86/boot: Adjust MSR_ARCH_CAPS handling for the Host policy
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 15 May 2023 13:14:53 +0000 (14:14 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Aug 2023 15:02:53 +0000 (16:02 +0100)
commita21bfbd10b0daf46bd596b7bde2d0a6a9351ffa7
treeae35f88c8ea817692af338e000569977cdadbd7d
parent17c152e8ce93412a721b516e9896d1fe8ef79394
x86/boot: Adjust MSR_ARCH_CAPS handling for the Host policy

We are about to move MSR_ARCH_CAPS into featureset, but the order of
operations (copy raw policy, then copy x86_capabilitiles[] in) will end up
clobbering the ARCH_CAPS value.

Some toolstacks use this information to handle TSX compatibility across the
CPUs and microcode versions where support was removed.

To avoid this transient breakage, read from raw_cpu_policy rather than
modifying it in place.  This logic will be removed entirely in due course.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 43912f8dbb1888ffd7f00adb10724c70e71927c4)
xen/arch/x86/cpu-policy.c