]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
x86,fs/resctrl: Handle events that can be read from any CPU
authorTony Luck <tony.luck@intel.com>
Wed, 17 Dec 2025 17:20:58 +0000 (09:20 -0800)
committerBorislav Petkov (AMD) <bp@alien8.de>
Mon, 5 Jan 2026 14:38:07 +0000 (15:38 +0100)
commitab0308aee3819a3eccde42f9eb5bb01d6733be38
treeb21ee291be107584f6dc685c9c3ed5ba4f0f2912
parentdd110880e80d35ad07e460e7a8da007c8058e7bf
x86,fs/resctrl: Handle events that can be read from any CPU

resctrl assumes that monitor events can only be read from a CPU in the
cpumask_t set of each domain.  This is true for x86 events accessed with an
MSR interface, but may not be true for other access methods such as MMIO.

Introduce and use flag mon_evt::any_cpu, settable by architecture, that
indicates there are no restrictions on which CPU can read that event.  This
flag is not supported by the L3 event reading that requires to be run on a CPU
that belongs to the L3 domain of the event being read.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
Link: https://lore.kernel.org/20251217172121.12030-1-tony.luck@intel.com
arch/x86/kernel/cpu/resctrl/core.c
fs/resctrl/ctrlmondata.c
fs/resctrl/internal.h
fs/resctrl/monitor.c
include/linux/resctrl.h