Signed-off-by: Claudio Fontana <cfont...@suse.de>
---
 src/qemu/qemu_saveimage.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/qemu/qemu_saveimage.c b/src/qemu/qemu_saveimage.c
index f60040ef25..d3757254a9 100644
--- a/src/qemu/qemu_saveimage.c
+++ b/src/qemu/qemu_saveimage.c
@@ -708,6 +708,23 @@ int qemuSaveImageLoadMultiFd(virConnectPtr conn, 
virDomainObj *vm,
                                       QEMU_MIGRATION_PARAM_MULTIFD_CHANNELS,
                                       saveFd->nchannels) < 0)
             goto cleanup;
+        if (virQEMUCapsGet(priv->qemuCaps, 
QEMU_CAPS_MIGRATION_PARAM_MULTIFD_COMPRESSION)) {
+            const char *pcomp = 
qemuSaveMultiFdCompTypeToString(data->header.multifd_comp);
+            if (!pcomp) {
+                virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
+                               _("libvirt does not support parallel 
compression type %u"),
+                               data->header.multifd_comp);
+                goto cleanup;
+            }
+            if (qemuMigrationParamsSetString(migParams,
+                                             
QEMU_MIGRATION_PARAM_MULTIFD_COMPRESSION,
+                                             pcomp) < 0)
+                goto cleanup;
+        } else if (data->header.multifd_comp != QEMU_SAVE_MULTIFD_COMP_NONE) {
+            virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+                           _("QEMU does not seem to support multifd 
compression"));
+            goto cleanup;
+        }
         if (qemuMigrationParamsApply(driver, vm, asyncJob, migParams) < 0)
             goto cleanup;
 
-- 
2.26.2

Reply via email to