]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Init host cache info in drivers
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 29 Mar 2017 13:52:31 +0000 (15:52 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Tue, 9 May 2017 11:12:40 +0000 (13:12 +0200)
Added only in drivers that were already calling
virCapabilitiesInitNUMA().  Instead of refactoring all the callers to
behave the same way in case of error, just follow what the callers are
doing for all the functions.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/lxc/lxc_conf.c
src/openvz/openvz_conf.c
src/phyp/phyp_driver.c
src/qemu/qemu_capabilities.c
src/uml/uml_conf.c
src/vbox/vbox_common.c
src/vmware/vmware_conf.c
src/vz/vz_driver.c

index e47b667f582a30c591bf08dda0aadb7510a7690a..508b98ba21b3c9549e932b3b601f9358aa0af4cd 100644 (file)
@@ -81,6 +81,9 @@ virCapsPtr virLXCDriverCapsInit(virLXCDriverPtr driver)
         VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
     }
 
+    if (virCapabilitiesInitCaches(caps) < 0)
+        VIR_WARN("Failed to get host CPU cache info");
+
     /* Only probe for power management capabilities in the driver,
      * not in the emulator */
     if (driver && virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
index 196fefb8de19d1280c74de12373cc3d87cf3492a..23a02d749e8bd5a7719bec4a8e291fbd0304615f 100644 (file)
@@ -168,6 +168,9 @@ virCapsPtr openvzCapsInit(void)
     if (virCapabilitiesInitNUMA(caps) < 0)
         goto no_memory;
 
+    if (virCapabilitiesInitCaches(caps) < 0)
+        goto no_memory;
+
     if ((guest = virCapabilitiesAddGuest(caps,
                                          VIR_DOMAIN_OSTYPE_EXE,
                                          caps->host.arch,
index 2123784f70dacbb84d35569b277ca98667436e6d..0cc288f36d8e992c42d7183733718e790cf7f8d3 100644 (file)
@@ -340,6 +340,9 @@ phypCapsInit(void)
             ("Failed to query host NUMA topology, disabling NUMA capabilities");
     }
 
+    if (virCapabilitiesInitCaches(caps) < 0)
+        VIR_WARN("Failed to get host CPU cache info");
+
     if ((guest = virCapabilitiesAddGuest(caps,
                                          VIR_DOMAIN_OSTYPE_LINUX,
                                          caps->host.arch,
index 8bc3ea026078e2994de17a719d1182f160eb7b99..71951e6c82aeb84ec9d424cd5b21fa27cd6a83f9 100644 (file)
@@ -1123,6 +1123,9 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
         VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
     }
 
+    if (virCapabilitiesInitCaches(caps) < 0)
+        VIR_WARN("Failed to get host CPU cache info");
+
     if (!(caps->host.cpu = virCPUProbeHost(caps->host.arch)))
         VIR_WARN("Failed to get host CPU");
 
index 97fe42a9d49dc60f2614e856bedd5caeacf4f4d8..49589b33c9f241f0d10f88aeae40458c679eb58b 100644 (file)
@@ -69,6 +69,9 @@ virCapsPtr umlCapsInit(void)
         VIR_WARN("Failed to query host NUMA topology, disabling NUMA capabilities");
     }
 
+    if (virCapabilitiesInitCaches(caps) < 0)
+        VIR_WARN("Failed to get host CPU cache info");
+
     if (virNodeSuspendGetTargetMask(&caps->host.powerMgmt) < 0)
         VIR_WARN("Failed to get host power management capabilities");
 
index d2b36ac0dfed2767e757f2cbb0113f5f53f17576..d6d363e456a73c91005698dd719cd73098d21a7e 100644 (file)
@@ -79,6 +79,9 @@ vboxCapsInit(void)
     if (virCapabilitiesInitNUMA(caps) < 0)
         goto no_memory;
 
+    if (virCapabilitiesInitCaches(caps) < 0)
+        goto no_memory;
+
     if ((guest = virCapabilitiesAddGuest(caps,
                                          VIR_DOMAIN_OSTYPE_HVM,
                                          caps->host.arch,
index bf4597c4748a7050a5b4c4e8d7ea9618eca245ef..891d9a47f0b46f9b117b41f86efe69a237f14b8f 100644 (file)
@@ -68,6 +68,9 @@ vmwareCapsInit(void)
     if (virCapabilitiesInitNUMA(caps) < 0)
         goto error;
 
+    if (virCapabilitiesInitCaches(caps) < 0)
+        goto error;
+
     /* i686 guests are always supported */
     if ((guest = virCapabilitiesAddGuest(caps,
                                          VIR_DOMAIN_OSTYPE_HVM,
index 059e7c9f4d4e6eeb9334d694474d051aaa03bd24..9a429f495ed84b598c7148e2125acdb14e2ee4d5 100644 (file)
@@ -118,6 +118,8 @@ vzBuildCapabilities(void)
     if (virCapabilitiesInitNUMA(caps) < 0)
         goto error;
 
+    if (virCapabilitiesInitCaches(caps) < 0)
+        goto error;
 
     verify(ARRAY_CARDINALITY(archs) == ARRAY_CARDINALITY(emulators));