mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-21 10:52:22 +00:00
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: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
4ad6a73bfc
commit
72e04d2800
@ -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));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user