]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration/multifd: Fix compat with QEMU < 9.0
authorFabiano Rosas <farosas@suse.de>
Fri, 13 Dec 2024 16:01:19 +0000 (13:01 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sun, 12 Jan 2025 12:54:21 +0000 (15:54 +0300)
commit7e4480dde246982f18b51d8f316a95a7dba2b825
tree29ec8641117a7067a3bb3d21dc3261ed11e5b048
parentf5827eb0ac3af024918fb702690188210c31202c
migration/multifd: Fix compat with QEMU < 9.0

Commit f5f48a7891 ("migration/multifd: Separate SYNC request with
normal jobs") changed the multifd source side to stop sending data
along with the MULTIFD_FLAG_SYNC, effectively introducing the concept
of a SYNC-only packet. Relying on that, commit d7e58f412c
("migration/multifd: Don't send ram data during SYNC") later came
along and skipped reading data from SYNC packets.

In a versions timeline like this:

  8.2 f5f48a7 9.0 9.1 d7e58f41 9.2

The issue arises that QEMUs < 9.0 still send data along with SYNC, but
QEMUs > 9.1 don't gather that data anymore. This leads to various
kinds of migration failures due to desync/missing data.

Stop checking for a SYNC packet on the destination and unconditionally
unfill the packet.

>From now on:

old -> new:
the source sends data + sync, destination reads normally

new -> new:
source sends only sync, destination reads zeros

new -> old:
source sends only sync, destination reads zeros

CC: qemu-stable@nongnu.org
Fixes: d7e58f412c ("migration/multifd: Don't send ram data during SYNC")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2720
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20241213160120.23880-2-farosas@suse.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
(cherry picked from commit b93d897ea2f0abbe7fc341a9ac176b5ecd0f3c93)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
migration/multifd.c