]> git.ipfire.org Git - thirdparty/linux.git/commit
fs/resctrl: Modify struct rdt_parse_data to pass mode and CLOSID
authorBabu Moger <babu.moger@amd.com>
Thu, 13 Nov 2025 00:57:34 +0000 (18:57 -0600)
committerBorislav Petkov (AMD) <bp@alien8.de>
Sat, 22 Nov 2025 12:10:12 +0000 (13:10 +0100)
commitaf1242eeca50b20076d1bc9a41653005634a8a4f
tree7805a763f216ff89b76738de3a4bc56750800293
parent77b662326200135fe72cedc47fb1b0e5679d604d
fs/resctrl: Modify struct rdt_parse_data to pass mode and CLOSID

parse_cbm() requires resource group mode and CLOSID to validate the capacity
bitmask (CBM). It is passed via struct rdtgroup in struct rdt_parse_data.

The io_alloc feature also uses CBMs to indicate which portions of cache are
allocated for I/O traffic. The CBMs are provided by user space and need to be
validated the same as CBMs provided for general (CPU) cache allocation.
parse_cbm() cannot be used as-is since io_alloc does not have rdtgroup context.

Pass the resource group mode and CLOSID directly to parse_cbm() via struct
rdt_parse_data, instead of through the rdtgroup struct, to facilitate calling
parse_cbm() to verify the CBM of the io_alloc feature.

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://patch.msgid.link/f8ec6ab5cf594d906a3fe75f56793d5fbd63f38f.1762995456.git.babu.moger@amd.com
fs/resctrl/ctrlmondata.c