From bc97a2c043b36172a0c1fcc35a4a8e3f7f7a5248 Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Thu, 12 Sep 2024 13:19:01 +0200 Subject: [PATCH] capabilities: Also report L2 caches 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 Reviewed-by: Michal Privoznik --- 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 74e6293766..1d3b7050b2 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 05b33147b7..829e0a3557 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-caches.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-caches.xml @@ -30,6 +30,10 @@ + + + + diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml index 167b217d8e..c9ab1a572b 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml @@ -42,6 +42,18 @@ + + + + + + + + + + + + diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml index 311bb58e6a..055c27a653 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml @@ -42,6 +42,18 @@ + + + + + + + + + + + + diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml index d85407f0b1..01ecb2e941 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 @@ + + + + + + + + + + + + diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml index fd854ee91e..d690ee9019 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml @@ -42,6 +42,18 @@ + + + + + + + + + + + +