]> xenbits.xensource.com Git - libvirt.git/commitdiff
virQEMUCapsCacheLookupCopy: Pass machine type
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 12 Feb 2015 12:48:42 +0000 (13:48 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 20 Feb 2015 12:27:59 +0000 (13:27 +0100)
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>
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.h
src/qemu/qemu_migration.c
src/qemu/qemu_process.c

index 4596f6cd15bbe3876ce56a439321bd5fb27a2924..100338ea1cae86f4e38792e99684f2efb3e515a1 100644 (file)
@@ -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;
index 1c1227abb08e9a4b1b2e23716fdf58c62f73ea4e..242a33d6cc926c8417eff47e7c2d08cc92f13fdb 100644 (file)
@@ -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);
index 14a4ec67a3b740f9af28a071849b547d35ad7fe2..20e40aa37a1ba5fdde5c467edc40e62c01a00a54 100644 (file)
@@ -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);
index ca1d51909e8274c0438dddaa029784d4798189b7..ee0495e6d8b32c3562028f308d598c5ee06b15d6 100644 (file)
@@ -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");