]> Gentwo Git Trees - linux/.git/commit
fs/resctrl: Support counter read/reset with mbm_event assignment mode
authorBabu Moger <babu.moger@amd.com>
Fri, 5 Sep 2025 21:34:22 +0000 (16:34 -0500)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 15 Sep 2025 10:38:58 +0000 (12:38 +0200)
commit159f36cd4de7718779fd0b232de5137b4ffd2d1e
tree6216e9d9635bbbce71afd40097e87f58fffa0f49
parent2a65b72c1603a74f35228acbb8de2ecff9c13efe
fs/resctrl: Support counter read/reset with mbm_event assignment mode

When "mbm_event" counter assignment mode is enabled, the architecture requires
a counter ID to read the event data.

Introduce an is_mbm_cntr field in struct rmid_read to indicate whether counter
assignment mode is in use.

Update the logic to call resctrl_arch_cntr_read() and resctrl_arch_reset_cntr()
when the assignment mode is active. Report 'Unassigned' in case the user attempts
to read an event without assigning a hardware counter.

Suggested-by: Reinette Chatre <reinette.chatre@intel.com>
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
Documentation/filesystems/resctrl.rst
fs/resctrl/ctrlmondata.c
fs/resctrl/internal.h
fs/resctrl/monitor.c