x86/intel: Move mcu_opt_ctrl_* into __ro_after_init
PATCH 1/1 x86/intel: Move mcu_opt_ctrl_* into __ro_after_init
They're only modified by set_in_mcu_opt_ctrl() which is an __init function.
No functional change.
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
In principle:
Fixes 39a40f3835ef ("x86/spec-ctrl: Clean up MSR_MCU_OPT_CTRL handling")
seeing as __ro_after_init existed at the time, but it was tied up in a security series and __ro_after_init was very new at the time.
--- xen/arch/x86/cpu/intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/cpu/intel.c +2 -2
@@ -21,8 +21,8 @@* MSR_MCU_OPT_CTRL is a collection of unrelated functionality, with separate * enablement requirements, but which want to be consistent across the system. */ -static uint32_t __read_mostly mcu_opt_ctrl_mask; -static uint32_t __read_mostly mcu_opt_ctrl_val; +static uint32_t __ro_after_init mcu_opt_ctrl_mask; +static uint32_t __ro_after_init mcu_opt_ctrl_val;void update_mcu_opt_ctrl (void ) {
base-commit: a1ce987411f61dbf5fe64bba0cd3d36d7cc0311f
Signature · 1 line
2.39.5
Quoted 5 lines · Andrew Cooper
They're only modified by
set_in_mcu_opt_ctrl()which is an__initfunction.No functional change.
Signed-off-by Andrew Cooper <[email protected]>
Reviewed-by Jan Beulich <[email protected]>