提交 72e04d28 编写于 作者: M Martin Kletzander

Init host cache info in drivers

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: NMartin Kletzander <mkletzan@redhat.com>
上级 4ad6a73b
......@@ -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)
......
......@@ -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,
......
......@@ -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,
......
......@@ -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");
......
......@@ -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");
......
......@@ -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,
......
......@@ -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,
......
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册