[RFC PATCH 4/5] kselftests/resctrl: set shareable_mask to zero if all bits are shared between software and hardware
Shaopeng Tan
tan.shaopeng at fujitsu.com
Thu Jan 22 20:40:30 PST 2026
When all bits are shared between software and hardware, CAT test can not run.
In the case of MPAM driver, even if all bits are shared between
hardware and software, they can be used as if software-exclusive.
To enable CAT, if all bits are shared between hardware and software,
set shareable_mask to zero.
Signed-off-by: Shaopeng Tan <tan.shaopeng at fujitsu.com>
---
tools/testing/selftests/resctrl/resctrlfs.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/resctrl/resctrlfs.c b/tools/testing/selftests/resctrl/resctrlfs.c
index 195f04c4d158..4b9ee803a112 100644
--- a/tools/testing/selftests/resctrl/resctrlfs.c
+++ b/tools/testing/selftests/resctrl/resctrlfs.c
@@ -495,6 +495,8 @@ int get_mask_no_shareable(const char *cache_type, unsigned long *mask)
return -1;
if (get_shareable_mask(cache_type, &shareable_mask) < 0)
return -1;
+ if (full_mask == shareable_mask)
+ shareable_mask = 0;
len = count_contiguous_bits(full_mask & ~shareable_mask, &start);
if (!len)
--
2.47.3
More information about the linux-arm-kernel
mailing list