]> 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)
committerPeter Xu <peterx@redhat.com>
Tue, 20 May 2025 15:26:32 +0000 (11:26 -0400)
commit6be7696129b302830a9cff7e30484e08c2d64b57
treebd9f4a7842e36982f80d90e6def64aa101983c53
parent766bbabac8f00bc5cf23ba90a8326678636280ed
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>
migration/multifd.c