]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Add support for return-path migration capability
authorJiri Denemark <jdenemar@redhat.com>
Wed, 8 Dec 2021 15:19:26 +0000 (16:19 +0100)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 15 Dec 2021 09:44:50 +0000 (10:44 +0100)
When return-path is enabled, QEMU on the source host won't report
completed migration until the destination QEMU sends a confirmation it
successfully loaded all data. Libvirt would detect such situation in the
Finish phase and report the error read from QEMU's stderr back to the
source, but using return-path could give use a bit better error
reporting with an earlier restart of vCPUs on the source.

The capability is only enabled when the connection between QEMU
processes on the source and destination hosts is bidirectional. In other
words, only when VIR_MIGRATE_TUNNELLED is not set, because our tunnel
only allows one-way communication from the source to the destination.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_migration_params.c
src/qemu/qemu_migration_params.h

index f5364a5ca2ae07590eb9afb1e8536c6ac9fdec52..7b225fdf4bea25b9cb1d2461394c401f79fdd408 100644 (file)
@@ -95,6 +95,7 @@ VIR_ENUM_IMPL(qemuMigrationCapability,
               "late-block-activate",
               "multifd",
               "dirty-bitmaps",
+              "return-path",
 );
 
 
@@ -171,6 +172,11 @@ static const qemuMigrationParamsFlagMapItem qemuMigrationParamsFlagMap[] = {
      VIR_MIGRATE_PARALLEL,
      QEMU_MIGRATION_CAP_MULTIFD,
      QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
+
+    {QEMU_MIGRATION_FLAG_FORBIDDEN,
+     VIR_MIGRATE_TUNNELLED,
+     QEMU_MIGRATION_CAP_RETURN_PATH,
+     QEMU_MIGRATION_SOURCE | QEMU_MIGRATION_DESTINATION},
 };
 
 /* Translation from VIR_MIGRATE_PARAM_* typed parameters to
index f770bd25764d357d70069f4395ee3b9b89d3b331..b4de8dda7bb14232511b70bd0b6ae2c36daff2ff 100644 (file)
@@ -40,6 +40,7 @@ typedef enum {
     QEMU_MIGRATION_CAP_LATE_BLOCK_ACTIVATE,
     QEMU_MIGRATION_CAP_MULTIFD,
     QEMU_MIGRATION_CAP_BLOCK_DIRTY_BITMAPS,
+    QEMU_MIGRATION_CAP_RETURN_PATH,
 
     QEMU_MIGRATION_CAP_LAST
 } qemuMigrationCapability;