Since some systems support control for L2 caches as well as L3 caches it would be useful to report their configuration in capabilities. Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx> --- src/conf/capabilities.c | 2 +- tests/vircaps2xmldata/vircaps-x86_64-caches.xml | 4 ++++ tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml | 12 ++++++++++++ tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml | 12 ++++++++++++ .../vircaps-x86_64-resctrl-fake-feature.xml | 12 ++++++++++++ tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml | 12 ++++++++++++ 6 files changed, 53 insertions(+), 1 deletion(-) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 74e629376616..1d3b7050b2e3 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -2161,7 +2161,7 @@ virCapabilitiesInitCaches(virCaps *caps) /* Minimum level to expose in capabilities. Can be lowered or removed (with * the appropriate code below), but should not be increased, because we'd * lose information. */ - const int cache_min_level = 3; + const int cache_min_level = 2; if (virCapabilitiesInitResctrl(caps) < 0) return -1; diff --git a/tests/vircaps2xmldata/vircaps-x86_64-caches.xml b/tests/vircaps2xmldata/vircaps-x86_64-caches.xml index 05b33147b70b..829e0a3557f0 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-caches.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-caches.xml @@ -30,6 +30,10 @@ </cells> </topology> <cache> + <bank id='0' level='2' type='both' size='256' unit='KiB' cpus='0-1'/> + <bank id='1' level='2' type='both' size='256' unit='KiB' cpus='2-3'/> + <bank id='2' level='2' type='both' size='256' unit='KiB' cpus='4-5'/> + <bank id='3' level='2' type='both' size='256' unit='KiB' cpus='6-7'/> <bank id='0' level='3' type='both' size='8' unit='MiB' cpus='0-7'/> </cache> </host> diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml index 167b217d8e45..c9ab1a572be6 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml @@ -42,6 +42,18 @@ </cells> </topology> <cache> + <bank id='0' level='2' type='both' size='256' unit='KiB' cpus='0'/> + <bank id='1' level='2' type='both' size='256' unit='KiB' cpus='1'/> + <bank id='2' level='2' type='both' size='256' unit='KiB' cpus='2'/> + <bank id='3' level='2' type='both' size='256' unit='KiB' cpus='3'/> + <bank id='4' level='2' type='both' size='256' unit='KiB' cpus='4'/> + <bank id='5' level='2' type='both' size='256' unit='KiB' cpus='5'/> + <bank id='8' level='2' type='both' size='256' unit='KiB' cpus='6'/> + <bank id='9' level='2' type='both' size='256' unit='KiB' cpus='7'/> + <bank id='10' level='2' type='both' size='256' unit='KiB' cpus='8'/> + <bank id='11' level='2' type='both' size='256' unit='KiB' cpus='9'/> + <bank id='12' level='2' type='both' size='256' unit='KiB' cpus='10'/> + <bank id='13' level='2' type='both' size='256' unit='KiB' cpus='11'/> <bank id='0' level='3' type='both' size='15' unit='MiB' cpus='0-5'> <control granularity='768' unit='KiB' type='code' maxAllocs='8'/> <control granularity='768' unit='KiB' type='data' maxAllocs='8'/> diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml index 311bb58e6a6b..055c27a65376 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml @@ -42,6 +42,18 @@ </cells> </topology> <cache> + <bank id='0' level='2' type='both' size='256' unit='KiB' cpus='0'/> + <bank id='1' level='2' type='both' size='256' unit='KiB' cpus='1'/> + <bank id='2' level='2' type='both' size='256' unit='KiB' cpus='2'/> + <bank id='3' level='2' type='both' size='256' unit='KiB' cpus='3'/> + <bank id='4' level='2' type='both' size='256' unit='KiB' cpus='4'/> + <bank id='5' level='2' type='both' size='256' unit='KiB' cpus='5'/> + <bank id='8' level='2' type='both' size='256' unit='KiB' cpus='6'/> + <bank id='9' level='2' type='both' size='256' unit='KiB' cpus='7'/> + <bank id='10' level='2' type='both' size='256' unit='KiB' cpus='8'/> + <bank id='11' level='2' type='both' size='256' unit='KiB' cpus='9'/> + <bank id='12' level='2' type='both' size='256' unit='KiB' cpus='10'/> + <bank id='13' level='2' type='both' size='256' unit='KiB' cpus='11'/> <bank id='0' level='3' type='both' size='15' unit='MiB' cpus='0-5'/> <bank id='1' level='3' type='both' size='15' unit='MiB' cpus='6-11'/> <monitor level='3' reuseThreshold='270336' maxMonitors='176'> diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml index d85407f0b10d..01ecb2e94104 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml @@ -42,6 +42,18 @@ </cells> </topology> <cache> + <bank id='0' level='2' type='both' size='256' unit='KiB' cpus='0'/> + <bank id='1' level='2' type='both' size='256' unit='KiB' cpus='1'/> + <bank id='2' level='2' type='both' size='256' unit='KiB' cpus='2'/> + <bank id='3' level='2' type='both' size='256' unit='KiB' cpus='3'/> + <bank id='4' level='2' type='both' size='256' unit='KiB' cpus='4'/> + <bank id='5' level='2' type='both' size='256' unit='KiB' cpus='5'/> + <bank id='8' level='2' type='both' size='256' unit='KiB' cpus='6'/> + <bank id='9' level='2' type='both' size='256' unit='KiB' cpus='7'/> + <bank id='10' level='2' type='both' size='256' unit='KiB' cpus='8'/> + <bank id='11' level='2' type='both' size='256' unit='KiB' cpus='9'/> + <bank id='12' level='2' type='both' size='256' unit='KiB' cpus='10'/> + <bank id='13' level='2' type='both' size='256' unit='KiB' cpus='11'/> <bank id='0' level='3' type='both' size='15' unit='MiB' cpus='0-5'> <control granularity='768' min='1536' unit='KiB' type='both' maxAllocs='4'/> </bank> diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml index fd854ee91e01..d690ee90191c 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml @@ -42,6 +42,18 @@ </cells> </topology> <cache> + <bank id='0' level='2' type='both' size='256' unit='KiB' cpus='0'/> + <bank id='1' level='2' type='both' size='256' unit='KiB' cpus='1'/> + <bank id='2' level='2' type='both' size='256' unit='KiB' cpus='2'/> + <bank id='3' level='2' type='both' size='256' unit='KiB' cpus='3'/> + <bank id='4' level='2' type='both' size='256' unit='KiB' cpus='4'/> + <bank id='5' level='2' type='both' size='256' unit='KiB' cpus='5'/> + <bank id='8' level='2' type='both' size='256' unit='KiB' cpus='6'/> + <bank id='9' level='2' type='both' size='256' unit='KiB' cpus='7'/> + <bank id='10' level='2' type='both' size='256' unit='KiB' cpus='8'/> + <bank id='11' level='2' type='both' size='256' unit='KiB' cpus='9'/> + <bank id='12' level='2' type='both' size='256' unit='KiB' cpus='10'/> + <bank id='13' level='2' type='both' size='256' unit='KiB' cpus='11'/> <bank id='0' level='3' type='both' size='15' unit='MiB' cpus='0-5'> <control granularity='768' min='1536' unit='KiB' type='both' maxAllocs='4'/> </bank> -- 2.46.0