]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration/multifd: Don't send device state packets with zerocopy flag
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
Fri, 16 May 2025 13:53:03 +0000 (15:53 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Thu, 22 May 2025 20:11:57 +0000 (23:11 +0300)
commit7484d61bdbc88923969d8d0e2e26e8ba0935f53a
treef91a1b79557a5e185249ff46c3ba74765e66e683
parent5e8ef1da897e8e7b30f4e0102f2832a9a73518af
migration/multifd: Don't send device state packets with zerocopy flag

If zerocopy is enabled for multifd then QIO_CHANNEL_WRITE_FLAG_ZERO_COPY
flag is forced into all multifd channel write calls via p->write_flags
that was setup in multifd_nocomp_send_setup().

However, device state packets aren't compatible with zerocopy - the data
buffer isn't getting kept pinned until multifd channel flush.

Make sure to mask that QIO_CHANNEL_WRITE_FLAG_ZERO_COPY flag in a multifd
send thread if the data being sent is device state.

Fixes: 0525b91a0b99 ("migration/multifd: Device state transfer support - send side")
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/3bd5f48578e29f3a78f41b1e4fbea3d4b2d9b136.1747403393.git.maciej.szmigiero@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>
(cherry picked from commit 6be7696129b302830a9cff7e30484e08c2d64b57)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
migration/multifd.c