]> xenbits.xensource.com Git - libvirt.git/commitdiff
capabilities: Also report L2 caches
authorMartin Kletzander <mkletzan@redhat.com>
Thu, 12 Sep 2024 11:19:01 +0000 (13:19 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Fri, 13 Sep 2024 10:55:39 +0000 (12:55 +0200)
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@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/capabilities.c
tests/vircaps2xmldata/vircaps-x86_64-caches.xml
tests/vircaps2xmldata/vircaps-x86_64-resctrl-cdp.xml
tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml
tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml
tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml

index 74e62937661654fb5000ddb007b375d34018ab46..1d3b7050b2e3497b39dcd26d1e8bb7a97dc5fba2 100644 (file)
@@ -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;
index 05b33147b70bbd4e64a833b912cf9ac60f6526d3..829e0a3557f0365bfaaeb6bf33a30407f6702c4e 100644 (file)
       </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>
index 167b217d8e45ebdb5d69a264ffb96f6b49c4eed1..c9ab1a572be67e12d48427138f6f2067bb7ba853 100644 (file)
       </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'/>
index 311bb58e6a6ba1db72a77f3b008fd44a831ad565..055c27a65376a367a3dfdc7957e2c2bc8884110f 100644 (file)
       </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'>
index d85407f0b10d69b08d19addb23a400647934092d..01ecb2e941047b812bc99f1848df271b2eb0066e 100644 (file)
       </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>
index fd854ee91e018b64bd6e24202d812d238da27c23..d690ee90191c3b773ca31eb9e6d680390732b6da 100644 (file)
       </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>