032100
From d24586ede83472f850d1a0c520d482ac5f908696 Mon Sep 17 00:00:00 2001
032100
Message-Id: <d24586ede83472f850d1a0c520d482ac5f908696@dist-git>
032100
From: Jiri Denemark <jdenemar@redhat.com>
032100
Date: Thu, 30 Jun 2022 12:51:55 +0200
032100
Subject: [PATCH] qemu_migration: Pass migParams to qemuMigrationSrcResume
032100
032100
So the we can apply selected migration parameters even when resuming
032100
post-copy migration.
032100
032100
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
032100
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
032100
(cherry picked from commit 8c335b5530194dbcef719a4d88c89b8723b831a5)
032100
032100
https://bugzilla.redhat.com/show_bug.cgi?id=2111070
032100
032100
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
032100
---
032100
 src/qemu/qemu_migration.c | 8 +++++---
032100
 1 file changed, 5 insertions(+), 3 deletions(-)
032100
032100
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
032100
index 8cbd73a809..285a49c5ff 100644
032100
--- a/src/qemu/qemu_migration.c
032100
+++ b/src/qemu/qemu_migration.c
032100
@@ -5097,6 +5097,7 @@ qemuMigrationSrcRun(virQEMUDriver *driver,
032100
 
032100
 static int
032100
 qemuMigrationSrcResume(virDomainObj *vm,
032100
+                       qemuMigrationParams *migParams G_GNUC_UNUSED,
032100
                        const char *cookiein,
032100
                        int cookieinlen,
032100
                        char **cookieout,
032100
@@ -5229,7 +5230,7 @@ qemuMigrationSrcPerformNative(virQEMUDriver *driver,
032100
     spec.fwdType = MIGRATION_FWD_DIRECT;
032100
 
032100
     if (flags & VIR_MIGRATE_POSTCOPY_RESUME) {
032100
-        ret = qemuMigrationSrcResume(vm, cookiein, cookieinlen,
032100
+        ret = qemuMigrationSrcResume(vm, migParams, cookiein, cookieinlen,
032100
                                      cookieout, cookieoutlen, &spec);
032100
     } else {
032100
         ret = qemuMigrationSrcRun(driver, vm, persist_xml, cookiein, cookieinlen,
032100
@@ -6124,6 +6125,7 @@ qemuMigrationSrcPerformResume(virQEMUDriver *driver,
032100
                               virConnectPtr conn,
032100
                               virDomainObj *vm,
032100
                               const char *uri,
032100
+                              qemuMigrationParams *migParams,
032100
                               const char *cookiein,
032100
                               int cookieinlen,
032100
                               char **cookieout,
032100
@@ -6148,7 +6150,7 @@ qemuMigrationSrcPerformResume(virQEMUDriver *driver,
032100
     ret = qemuMigrationSrcPerformNative(driver, vm, NULL, uri,
032100
                                         cookiein, cookieinlen,
032100
                                         cookieout, cookieoutlen, flags,
032100
-                                        0, NULL, NULL, 0, NULL, NULL, NULL);
032100
+                                        0, NULL, NULL, 0, NULL, migParams, NULL);
032100
 
032100
     if (virCloseCallbacksSet(driver->closeCallbacks, vm, conn,
032100
                              qemuMigrationAnyConnectionClosed) < 0)
032100
@@ -6188,7 +6190,7 @@ qemuMigrationSrcPerformPhase(virQEMUDriver *driver,
032100
     int ret = -1;
032100
 
032100
     if (flags & VIR_MIGRATE_POSTCOPY_RESUME) {
032100
-        return qemuMigrationSrcPerformResume(driver, conn, vm, uri,
032100
+        return qemuMigrationSrcPerformResume(driver, conn, vm, uri, migParams,
032100
                                              cookiein, cookieinlen,
032100
                                              cookieout, cookieoutlen, flags);
032100
     }
032100
-- 
032100
2.35.1
032100