summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorBabu Moger <babu.moger@amd.com>2025-09-05 16:34:07 -0500
committerBorislav Petkov (AMD) <bp@alien8.de>2025-09-15 12:08:01 +0200
commit13390861b426e936db20d675804a5b405622bc79 (patch)
tree580d5eb66541241dfe44fc4f91319e6a469d6883 /include/linux
parent5ad68c8f965fed78c61f2ac7aea933f06bb50032 (diff)
x86,fs/resctrl: Detect Assignable Bandwidth Monitoring feature details
ABMC feature details are reported via CPUID Fn8000_0020_EBX_x5. Bits Description 15:0 MAX_ABMC Maximum Supported Assignable Bandwidth Monitoring Counter ID + 1 The ABMC feature details are documented in APM [1] available from [2]. [1] AMD64 Architecture Programmer's Manual Volume 2: System Programming Publication # 24593 Revision 3.41 section 19.3.3.3 Assignable Bandwidth Monitoring (ABMC). Detect the feature and number of assignable counters supported. For backward compatibility, upon detecting the assignable counter feature, enable the mbm_total_bytes and mbm_local_bytes events that users are familiar with as part of original L3 MBM support. Signed-off-by: Babu Moger <babu.moger@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Link: https://lore.kernel.org/cover.1757108044.git.babu.moger@amd.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 # [2]
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/resctrl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/resctrl.h b/include/linux/resctrl.h
index fe2af6cb96d4..eb80cc233be4 100644
--- a/include/linux/resctrl.h
+++ b/include/linux/resctrl.h
@@ -260,10 +260,14 @@ enum resctrl_schema_fmt {
* @num_rmid: Number of RMIDs available.
* @mbm_cfg_mask: Memory transactions that can be tracked when bandwidth
* monitoring events can be configured.
+ * @num_mbm_cntrs: Number of assignable counters.
+ * @mbm_cntr_assignable:Is system capable of supporting counter assignment?
*/
struct resctrl_mon {
int num_rmid;
unsigned int mbm_cfg_mask;
+ int num_mbm_cntrs;
+ bool mbm_cntr_assignable;
};
/**