Hi Ilpo, On 11/20/2023 3:13 AM, Ilpo Järvinen wrote: > Domain id is acquired differently depending on CPU. AMD tests use id > from L3 cache, whereas CPUs from other vendors base the id on topology > package id. In order to support L2 CAT test, this has to be > generalized. > > The driver side code seems to get the domain ids from cache ids so the > approach used by the AMD branch seems to match the kernel-side code. It > will also work with L2 domain IDs as long as the cache level is > generalized. > > Using the topology id was always fragile due to mismatch with the > kernel-side way to acquire the domain id. It got incorrect domain id, > e.g., when Cluster-on-Die (CoD) is enabled for CPU (but CoD is not well > suited for resctrl in the first place so it has not been a big issue if > tests don't work correctly with it). > > Taking all the above into account, generalize acquiring the domain id > by taking it from the cache id and do not hard-code the cache level. > > Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx> > --- Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx> Reinette