提交 37cf163a 编写于 作者: M Michal Privoznik

virQEMUCapsCacheLookupCopy: Pass machine type

It will come handy in the near future when we will filter some
capabilities based on it.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 1bb1de83
......@@ -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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册