mirror of https://gitee.com/openkylin/libvirt.git
virQEMUCapsCacheLookupCopy: Pass machine type
It will come handy in the near future when we will filter some capabilities based on it. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
1bb1de83b2
commit
37cf163ab2
|
@ -3588,7 +3588,9 @@ virQEMUCapsCacheLookup(virQEMUCapsCachePtr cache, const char *binary)
|
|||
|
||||
|
||||
virQEMUCapsPtr
|
||||
virQEMUCapsCacheLookupCopy(virQEMUCapsCachePtr cache, const char *binary)
|
||||
virQEMUCapsCacheLookupCopy(virQEMUCapsCachePtr cache,
|
||||
const char *binary,
|
||||
const char *machineType ATTRIBUTE_UNUSED)
|
||||
{
|
||||
virQEMUCapsPtr qemuCaps = virQEMUCapsCacheLookup(cache, binary);
|
||||
virQEMUCapsPtr ret;
|
||||
|
|
|
@ -291,7 +291,8 @@ virQEMUCapsCachePtr virQEMUCapsCacheNew(const char *libDir,
|
|||
virQEMUCapsPtr virQEMUCapsCacheLookup(virQEMUCapsCachePtr cache,
|
||||
const char *binary);
|
||||
virQEMUCapsPtr virQEMUCapsCacheLookupCopy(virQEMUCapsCachePtr cache,
|
||||
const char *binary);
|
||||
const char *binary,
|
||||
const char *machineType);
|
||||
virQEMUCapsPtr virQEMUCapsCacheLookupByArch(virQEMUCapsCachePtr cache,
|
||||
virArch arch);
|
||||
void virQEMUCapsCacheFree(virQEMUCapsCachePtr cache);
|
||||
|
|
|
@ -2915,7 +2915,8 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
|
|||
hostIPv6Capable = true;
|
||||
}
|
||||
if (!(qemuCaps = virQEMUCapsCacheLookupCopy(driver->qemuCapsCache,
|
||||
(*def)->emulator)))
|
||||
(*def)->emulator,
|
||||
(*def)->os.machine)))
|
||||
goto cleanup;
|
||||
|
||||
qemuIPv6Capable = virQEMUCapsGet(qemuCaps, QEMU_CAPS_IPV6_MIGRATION);
|
||||
|
|
|
@ -3834,7 +3834,8 @@ qemuProcessReconnect(void *opaque)
|
|||
*/
|
||||
if (!priv->qemuCaps &&
|
||||
!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(driver->qemuCapsCache,
|
||||
obj->def->emulator)))
|
||||
obj->def->emulator,
|
||||
obj->def->os.machine)))
|
||||
goto error;
|
||||
|
||||
/* In case the domain shutdown while we were not running,
|
||||
|
@ -4466,7 +4467,8 @@ int qemuProcessStart(virConnectPtr conn,
|
|||
VIR_DEBUG("Determining emulator version");
|
||||
virObjectUnref(priv->qemuCaps);
|
||||
if (!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(driver->qemuCapsCache,
|
||||
vm->def->emulator)))
|
||||
vm->def->emulator,
|
||||
vm->def->os.machine)))
|
||||
goto cleanup;
|
||||
|
||||
/* network devices must be "prepared" before hostdevs, because
|
||||
|
@ -5510,7 +5512,8 @@ int qemuProcessAttach(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||
VIR_DEBUG("Determining emulator version");
|
||||
virObjectUnref(priv->qemuCaps);
|
||||
if (!(priv->qemuCaps = virQEMUCapsCacheLookupCopy(driver->qemuCapsCache,
|
||||
vm->def->emulator)))
|
||||
vm->def->emulator,
|
||||
vm->def->os.machine)))
|
||||
goto error;
|
||||
|
||||
VIR_DEBUG("Preparing monitor state");
|
||||
|
|
Loading…
Reference in New Issue