From: Andrew Cooper Date: Thu, 28 Mar 2024 12:38:32 +0000 (+0000) Subject: x86/spec-ctrl: Move __read_mostly data into __ro_after_init X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=a0bd738f9cd158306e046c7a6f3726128219e4eb;p=people%2Faperard%2Fxen-unstable.git x86/spec-ctrl: Move __read_mostly data into __ro_after_init These variables predate the introduction of __ro_after_init, but all qualify. Update them to be consistent with the rest of the file. No functional change. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich (cherry picked from commit 7a09966e7b2823b70f6d56d0cf66c11124f4a3c1) --- diff --git a/xen/arch/x86/spec_ctrl.c b/xen/arch/x86/spec_ctrl.c index ac21af2c5c..0a2de88593 100644 --- a/xen/arch/x86/spec_ctrl.c +++ b/xen/arch/x86/spec_ctrl.c @@ -61,18 +61,18 @@ bool __ro_after_init opt_ssbd; int8_t __initdata opt_psfd = -1; int8_t __ro_after_init opt_ibpb_ctxt_switch = -1; -int8_t __read_mostly opt_eager_fpu = -1; -int8_t __read_mostly opt_l1d_flush = -1; +int8_t __ro_after_init opt_eager_fpu = -1; +int8_t __ro_after_init opt_l1d_flush = -1; static bool __initdata opt_branch_harden = IS_ENABLED(CONFIG_SPECULATIVE_HARDEN_BRANCH); static bool __initdata opt_lock_harden; bool __initdata bsp_delay_spec_ctrl; -uint8_t __read_mostly default_xen_spec_ctrl; -uint8_t __read_mostly default_spec_ctrl_flags; +uint8_t __ro_after_init default_xen_spec_ctrl; +uint8_t __ro_after_init default_spec_ctrl_flags; -paddr_t __read_mostly l1tf_addr_mask, __read_mostly l1tf_safe_maddr; -bool __read_mostly cpu_has_bug_l1tf; +paddr_t __ro_after_init l1tf_addr_mask, __ro_after_init l1tf_safe_maddr; +bool __ro_after_init cpu_has_bug_l1tf; static unsigned int __initdata l1d_maxphysaddr; static bool __initdata cpu_has_bug_msbds_only; /* => minimal HT impact. */ @@ -328,8 +328,8 @@ static int __init cf_check parse_spec_ctrl(const char *s) } custom_param("spec-ctrl", parse_spec_ctrl); -int8_t __read_mostly opt_xpti_hwdom = -1; -int8_t __read_mostly opt_xpti_domu = -1; +int8_t __ro_after_init opt_xpti_hwdom = -1; +int8_t __ro_after_init opt_xpti_domu = -1; static __init void xpti_init_default(void) { @@ -393,8 +393,8 @@ static int __init cf_check parse_xpti(const char *s) } custom_param("xpti", parse_xpti); -int8_t __read_mostly opt_pv_l1tf_hwdom = -1; -int8_t __read_mostly opt_pv_l1tf_domu = -1; +int8_t __ro_after_init opt_pv_l1tf_hwdom = -1; +int8_t __ro_after_init opt_pv_l1tf_domu = -1; static int __init cf_check parse_pv_l1tf(const char *s) {