RE: [PATCH 1/2] x86/resctrl: Add io_alloc_min_cbm_all interface for CBM reset
From: Luck, Tony
Date: Mon Nov 10 2025 - 19:54:32 EST
> The goal is not just to "clear" the CBM, but to reset it to the smallest
> valid mask.
"smallest valid mask" seems like a fuzzy concept.
Intel had one CPU that required 2 bits to be set in an L3 mask.
Subsequent CPUs only requires 1 bit.
AMD allows setting zero bits.
So for AMD "smallest valid mask" is zero. Very simple there.
But on Intel you must have either one or two bits set
(but it doesn't matter which bits).
In some cases you might want to pick a bit that
overlaps with the space shared in the cache for
non-CPU devices (typically top two valid bits of the
mask, but should check CPUID leaf 0x10 for the exact
bits).
Or you might want a bit that does NOT overlap with those
non-CPU allocations.
-Tony