Re: [PATCH v2 1/5] x86/msr: Switch users of native_wrmsr() to native_wrmsrq()

From: Reinette Chatre

Date: Mon Sep 14 2026 - 11:47:50 EST


Hi Juergen

On 9/11/26 12:52 AM, Juergen Gross wrote:

...

> ---
> V2:
> - switch order of hi and lo parts when oring them (Reinette Chatre)
> ---

...

> diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
> index 0408ac7f66fd..a04cf26e0302 100644
> --- a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
> +++ b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
> @@ -175,7 +175,7 @@ int resctrl_arch_pseudo_lock_fn(void *_plr)
> * pseudo-locked followed by reading of kernel memory to load it
> * into the cache.
> */
> - native_wrmsr(MSR_IA32_PQR_ASSOC, rmid_p, plr->closid);
> + native_wrmsrq(MSR_IA32_PQR_ASSOC, rmid_p | ((u64)plr->closid << 32));
>
> /*
> * Cache was flushed earlier. Now access kernel memory to read it
> @@ -212,7 +212,7 @@ int resctrl_arch_pseudo_lock_fn(void *_plr)
> * Critical section end: restore closid with capacity bitmask that
> * does not overlap with pseudo-locked region.
> */
> - native_wrmsr(MSR_IA32_PQR_ASSOC, rmid_p, closid_p);
> + native_wrmsrq(MSR_IA32_PQR_ASSOC, (u64)closid_p << 32 | rmid_p);
>
> /* Re-enable the hardware prefetcher(s) */
> wrmsrq(MSR_MISC_FEATURE_CONTROL, saved_msr);

Could both these hunks please use the same "high | low" pattern?

Thank you

Reinette