]> xenbits.xensource.com Git - xen.git/commit
x86/spec-ctrl: Clean up MSR_MCU_OPT_CTRL handling
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 19 May 2021 18:40:28 +0000 (19:40 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 8 Feb 2022 18:06:41 +0000 (18:06 +0000)
commit89eede61225c31efbe14a14711b57a2c01f08ca0
tree3f962b66464265d341897590962e855710026d7b
parent08ec8c11d653c40f8ea9c7e9740b0718de01a3f7
x86/spec-ctrl: Clean up MSR_MCU_OPT_CTRL handling

Introduce cpu_has_srbds_ctrl as more users are going to appear shortly.

MSR_MCU_OPT_CTRL is gaining extra functionality, meaning that the current
default_xen_mcu_opt_ctrl is no longer a good fit.

Introduce two new helpers, update_mcu_opt_ctrl() which does a full RMW cycle
on the MSR, and set_in_mcu_opt_ctrl() which lets callers configure specific
bits at a time without clobbering each others settings.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 39a40f3835efcc25c1b05a25c321a01d7e11cbd7)
xen/arch/x86/acpi/power.c
xen/arch/x86/cpu/intel.c
xen/arch/x86/smpboot.c
xen/arch/x86/spec_ctrl.c
xen/include/asm-x86/cpufeature.h
xen/include/asm-x86/processor.h
xen/include/asm-x86/spec_ctrl.h