From: Reinette Chatre <reinette.chatre@intel.com>
To: Babu Moger <babu.moger@amd.com>, <tglx@kernel.org>,
<mingo@redhat.com>, <bp@alien8.de>, <tony.luck@intel.com>
Cc: <dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
<Dave.Martin@arm.com>, <james.morse@arm.com>,
<dapeng1.mi@linux.intel.com>, <peterz@infradead.org>,
<seanjc@google.com>, <chang.seok.bae@intel.com>,
<acme@redhat.com>, <namhyung@kernel.org>,
<kan.liang@linux.intel.com>, <prathyushi.nangia@amd.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/resctrl: Rename AMD resctrl MSR defines to use MSR_AMD_ prefix
Date: Wed, 12 Aug 2026 15:29:07 -0700 [thread overview]
Message-ID: <483c5b72-5f39-435c-b6f7-0f9f4f7abff3@intel.com> (raw)
In-Reply-To: <96992e30d6c02ebb7bdb58f2d8060bfd61274649.1784739398.git.babu.moger@amd.com>
Hi Babu,
On 7/22/26 9:57 AM, Babu Moger wrote:
> Several resctrl MSRs in the AMD address range (0xc0000xxx) were defined
"Several resctrl MSRs" -> "resctrl MSRs"?
(looks like all of them were defined this way)
"were defined" -> "are defined"?
> with an MSR_IA32_ prefix even though they are AMD-specific and unrelated
> to Intel's IA32 resctrl MSRs. The MSR_IA32_ prefix is misleading when
> reading or grepping the codebase alongside the Intel MSR_IA32_* resctrl
> definitions in msr-index.h.
>
> Rename the AMD resctrl MSR definitions, update all call sites, and keep
> the tools copy of msr-index.h in sync:
>
> MSR_IA32_MBA_BW_BASE -> MSR_AMD_MBA_BW_BASE
> MSR_IA32_SMBA_BW_BASE -> MSR_AMD_SMBA_BW_BASE
> MSR_IA32_L3_QOS_ABMC_CFG -> MSR_AMD_L3_QOS_ABMC_CFG
> MSR_IA32_L3_QOS_EXT_CFG -> MSR_AMD_L3_QOS_EXT_CFG
> MSR_IA32_EVT_CFG_BASE -> MSR_AMD_EVT_CFG_BASE
>
> No functional changes.
>
> Suggested-by: Borislav Petkov (AMD) <bp@alien8.de>
> Signed-off-by: Babu Moger <babu.moger@amd.com>
> ---
...
> @@ -114,7 +114,7 @@ static void _resctrl_sdciae_enable(struct rdt_resource *r, bool enable)
> /* Walking r->ctrl_domains, ensure it can't race with cpuhp */
> lockdep_assert_cpus_held();
>
> - /* Update MSR_IA32_L3_QOS_EXT_CFG MSR on all the CPUs in all domains */
> + /* Update MSR_AMD_L3_QOS_EXT_CFG MSR on all the CPUs in all domains */
I think this is a good opportunity to remove the redundant text when referring to these MSRs.
For example, "Update MSR_AMD_L3_QOS_EXT_CFG MSR ..." can just be "Update MSR_AMD_L3_QOS_EXT_CFG ..."
This is indeed done by this patch, but not consistently.
> list_for_each_entry_rcu(d, &r->ctrl_domains, hdr.list, lockdep_is_cpus_held())
> on_each_cpu_mask(&d->hdr.cpu_mask, resctrl_sdciae_set_one_amd, &enable, 1);
> }
...
> diff --git a/arch/x86/kernel/cpu/resctrl/monitor.c b/arch/x86/kernel/cpu/resctrl/monitor.c
> index 3838e0a13d36..a2c9acc7aec8 100644
> --- a/arch/x86/kernel/cpu/resctrl/monitor.c
> +++ b/arch/x86/kernel/cpu/resctrl/monitor.c
> @@ -498,9 +498,9 @@ static void resctrl_abmc_set_one_amd(void *arg)
> bool *enable = arg;
>
> if (*enable)
> - msr_set_bit(MSR_IA32_L3_QOS_EXT_CFG, ABMC_ENABLE_BIT);
> + msr_set_bit(MSR_AMD_L3_QOS_EXT_CFG, ABMC_ENABLE_BIT);
> else
> - msr_clear_bit(MSR_IA32_L3_QOS_EXT_CFG, ABMC_ENABLE_BIT);
> + msr_clear_bit(MSR_AMD_L3_QOS_EXT_CFG, ABMC_ENABLE_BIT);
> }
>
> /*
The comment appearing at this point contains "L3_QOS_EXT_CFG MSR" - the changelog mentions
support for "grepping the codebase" making this a candidate for changing also?
> @@ -542,7 +542,7 @@ static void resctrl_abmc_config_one_amd(void *info)
> {
> union l3_qos_abmc_cfg *abmc_cfg = info;
>
> - wrmsrq(MSR_IA32_L3_QOS_ABMC_CFG, abmc_cfg->full);
> + wrmsrq(MSR_AMD_L3_QOS_ABMC_CFG, abmc_cfg->full);
> }
>
> /*
...
> diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
> index 30df902ea776..30c4c57e0e4c 100644
> --- a/fs/resctrl/rdtgroup.c
> +++ b/fs/resctrl/rdtgroup.c
> @@ -1785,8 +1785,8 @@ static void mbm_config_write_domain(struct rdt_resource *r,
> mon_info.mon_config = val;
>
> /*
> - * Update MSR_IA32_EVT_CFG_BASE MSR on one of the CPUs in the
> - * domain. The MSRs offset from MSR MSR_IA32_EVT_CFG_BASE
> + * Update MSR_AMD_EVT_CFG_BASE MSR on one of the CPUs in the
"MSR_AMD_EVT_CFG_BASE MSR" -> "MSR_AMD_EVT_CFG_BASE"?
> + * domain. The MSRs offset from MSR_AMD_EVT_CFG_BASE
Here the redundant text is indeed removed.
> * are scoped at the domain level. Writing any of these MSRs
> * on one CPU is observed by all the CPUs in the domain.
> */
I just have these nits. The patch looks good to me.
Reinette
prev parent reply other threads:[~2026-08-12 22:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-22 16:57 Babu Moger
2026-08-12 22:29 ` Reinette Chatre [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=483c5b72-5f39-435c-b6f7-0f9f4f7abff3@intel.com \
--to=reinette.chatre@intel.com \
--cc=Dave.Martin@arm.com \
--cc=acme@redhat.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=dapeng1.mi@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=prathyushi.nangia@amd.com \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®