mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Babu Moger <babu.moger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
	tony.luck@intel.com, bp@alien8.de
Cc: x86@kernel.org, Dave.Martin@arm.com, james.morse@arm.com,
	corbet@lwn.net, skhan@linuxfoundation.org, rdunlap@infradead.org,
	tglx@kernel.org, mingo@redhat.com, dave.hansen@linux.intel.com,
	hpa@zytor.com, kas@kernel.org, rick.p.edgecombe@intel.com,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-coco@lists.linux.dev, kvm@vger.kernel.org
Subject: Re: [PATCH v3 1/3] x86/resctrl: Fix ABMC counter programming
Date: Wed, 7 Oct 2026 11:33:21 -0500	[thread overview]
Message-ID: <45209a1b-5e52-4c50-a755-04affe312360@amd.com> (raw)
In-Reply-To: <f4a82716-5107-4f39-8c9f-94374f188857@intel.com>

Hi Reinette,

Thanks for the quick review.

On 10/6/26 12:47, Reinette Chatre wrote:
> Hi Babu,
> 
> On 10/2/26 2:26 PM, Babu Moger wrote:
>> AMD's Assignable Bandwidth Monitoring Counters (ABMC) are configured via
>> MSR_IA32_L3_QOS_ABMC_CFG. The architecture [1] received an update that
>> expands the counter ID field (l3_qos_abmc_cfg.split.cntr_id) from 5 to 12
> 
> This describes an architecture change as a code change (l3_qos_abmc_cfg)?
> 
> The subject also claims a "fix" but above establishes this just as an update because
> of architecture change without making clear what the problem needing fixing is.
> using the tip guidance when writing changelog will ensure that problem description
> is always clear.

Ack.>
>> bits.
>>
> 
>> Use the updated field width. The number of supported counters is enumerated
> 
> The second sentence of above paragraph seems out of place as it seems to add
> in a bit of additional context as part of the rest of the paragraph that describes
> the fix.
> 
>> separately. Mark this as a fix to the original ABMC support to avoid
> 
> Tag can speak for itself, just focus on describing the problem being fixed.
> 
> The problem and fix are fused together making it difficult to see what is being
> fixed here. Placing problem in its own paragraph helps to make this clear.
> 
>> misconfigurations caused by truncating counter IDs on hardware that
>> supports a large number of counters.
>>
>> Also limit the number of supported counters to the maximum value that can
>> be represented by the 12-bit cntr_id field if hardware reports more than
>> 12 bits.
> 
> This is the actual fix though but is added as an afterthought?
> 

Yea.

>>
>> The AMD64 Architecture Programmer's Manual [1], available at [2], will be
>> updated in a future revision to document the expanded cntr_id field.
> 
> 
> Consider an example changelog like below that aims to follow the x86 changelog
> guidelines:
> 
> AMD's Assignable Bandwidth Monitoring Counters (ABMC) are configured via
> MSR_IA32_L3_QOS_ABMC_CFG; MSR_IA32_L3_QOS_ABMC_CFG.cntr_id selects which counter
> the configuration applies to. The number of counters a platform supports (the
> number of possible values written to MSR_IA32_L3_QOS_ABMC_CFG.cntr_id) is
> enumerated separately via CPUID.
> 
> On a platform that enumerates more than 32 counters, writing a counter ID
> through the current 5-bit encoding truncates the ID and misprograms ABMC.
> 
> The AMD64 Architecture Programmer's Manual [1], available from [2], has been
> updated to widen MSR_IA32_L3_QOS_ABMC_CFG.cntr_id from 5 bits to 12 bits (the
> published revision 3.41 does not yet reflect this; a future revision will). The
> CPUID enumeration reports the maximum counter ID in a 16-bit field and can
> still report more counters than a 12-bit MSR_IA32_L3_QOS_ABMC_CFG.cntr_id
> can address.
> 
> Widen MSR_IA32_L3_QOS_ABMC_CFG.cntr_id to 12 bits to match the architecture. Cap
> the enumerated counter count at BIT(12) so every counter ID resctrl uses can be
> written to MSR_IA32_L3_QOS_ABMC_CFG.cntr_id without truncation.
> 
> 

Looks good.

>>
>> [1] AMD64 Architecture Programmer's Manual Volume 2: System Programming,
>>      Publication #24593, Revision 3.41, Section 19.3.3.3 "Assignable
>>      Bandwidth Monitoring (ABMC)"
>>
>> Fixes: 84ecefb76674 ("x86/resctrl: Add data structures and definitions for ABMC assignment")
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> Cc: stable@vger.kernel.org
>> Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 # [2]
>> ---
> Patch looks good to me.
  Thank you.

Babu



  reply	other threads:[~2026-10-07 16:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02 21:26 [PATCH v3 0/3] x86,fs/resctrl: Keep default MBM mode at boot and fix ABMC Babu Moger
2026-10-02 21:26 ` [PATCH v3 1/3] x86/resctrl: Fix ABMC counter programming Babu Moger
2026-10-06 17:47   ` Reinette Chatre
2026-10-07 16:33     ` Babu Moger [this message]
2026-10-02 21:26 ` [PATCH v3 2/3] fs/resctrl: Assign counters to existing groups when enabling mbm_event Babu Moger
2026-10-06 17:51   ` Reinette Chatre
2026-10-07 18:16     ` Babu Moger
2026-10-07 22:21       ` Reinette Chatre
2026-10-02 21:26 ` [PATCH v3 3/3] x86,fs/resctrl: Keep mbm_assign_mode in default mode at boot Babu Moger
2026-10-06 17:53   ` Reinette Chatre
2026-10-07 18:54     ` Babu Moger
2026-10-07 22:21       ` Reinette Chatre

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=45209a1b-5e52-4c50-a755-04affe312360@amd.com \
    --to=babu.moger@amd.com \
    --cc=Dave.Martin@arm.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=kas@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=reinette.chatre@intel.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=skhan@linuxfoundation.org \
    --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®