summaryrefslogtreecommitdiff
path: root/xen/arch/x86/smpboot.c
diff options
context:
space:
mode:
authorAndrew Cooper <andrew.cooper3@citrix.com>2021-05-19 19:40:28 +0100
committerAndrew Cooper <andrew.cooper3@citrix.com>2022-02-08 18:01:32 +0000
commit41e477b4f367269dc1b768a335cfa16f48f7f02f (patch)
tree58bd5603d1ebf21363170cf7f9874773bc8df419 /xen/arch/x86/smpboot.c
parent50183d9f7cce12cac0e089ccf765417aa5832efc (diff)
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)
Diffstat (limited to 'xen/arch/x86/smpboot.c')
-rw-r--r--xen/arch/x86/smpboot.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c
index 54237c6c6d..2596e4374b 100644
--- a/xen/arch/x86/smpboot.c
+++ b/xen/arch/x86/smpboot.c
@@ -384,8 +384,7 @@ void start_secondary(void *unused)
wrmsrl(MSR_SPEC_CTRL, default_xen_spec_ctrl);
info->last_spec_ctrl = default_xen_spec_ctrl;
}
- if ( boot_cpu_has(X86_FEATURE_SRBDS_CTRL) )
- wrmsrl(MSR_MCU_OPT_CTRL, default_xen_mcu_opt_ctrl);
+ update_mcu_opt_ctrl();
tsx_init(); /* Needs microcode. May change HLE/RTM feature bits. */