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