<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/qemu.git/migration/multifd-device-state.c, branch master</title>
<subtitle>QEMU main repository</subtitle>
<id>https://git.landau.one/pub/scm/virt/qemu/qemu.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/'/>
<updated>2025-12-23T14:24:34+00:00</updated>
<entry>
<title>migration: Replace migrate_set_error() with migrate_error_propagate()</title>
<updated>2025-12-23T14:24:34+00:00</updated>
<author>
<name>Peter Xu</name>
<email>peterx@redhat.com</email>
</author>
<published>2025-12-01T19:45:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=d4fd83c9b51612eb3bd674eb9c106f2d45fc2c28'/>
<id>urn:sha1:d4fd83c9b51612eb3bd674eb9c106f2d45fc2c28</id>
<content type='text'>
migrate_set_error() currently doesn't take ownership of the error being
passed in.  It's not aligned with the error API and meanwhile it also
makes most of the caller free the error explicitly.

Change the API to take the ownership of the Error object instead.  This
should save a lot of error_copy() invocations.

Reviewed-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Link: https://lore.kernel.org/r/20251201194510.1121221-8-peterx@redhat.com
[peterx: break line for qemu_savevm_send_packaged, per markus]
Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration: Use explicit error_free() instead of g_autoptr</title>
<updated>2025-12-23T14:24:34+00:00</updated>
<author>
<name>Peter Xu</name>
<email>peterx@redhat.com</email>
</author>
<published>2025-12-01T19:45:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=856ac0ccd8c7acfed7abee8f6218813c2b5d391a'/>
<id>urn:sha1:856ac0ccd8c7acfed7abee8f6218813c2b5d391a</id>
<content type='text'>
There're only two use cases of g_autoptr to free Error objects in migration
code paths.

Due to the nature of how Error should be used (normally ownership will be
passed over to Error APIs, like error_report_err), auto-free functions may
be error prone on its own.  The auto cleanup function was merged without
proper review, as pointed out by Dan and Markus:

https://lore.kernel.org/r/aSWSLMi6ZhTCS_p2@redhat.com

Remove the two use cases so that we can remove the auto cleanup function,
hence suggest to not use auto frees for Errors.

Suggested-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Link: https://lore.kernel.org/r/20251201194510.1121221-2-peterx@redhat.com
Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration: Rename save_live_complete_precopy_thread to save_complete_precopy_thread</title>
<updated>2025-07-11T13:37:39+00:00</updated>
<author>
<name>Juraj Marcin</name>
<email>jmarcin@redhat.com</email>
</author>
<published>2025-06-26T08:52:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=beeac2df5ff0850299e58f4ad27f83dae64c54df'/>
<id>urn:sha1:beeac2df5ff0850299e58f4ad27f83dae64c54df</id>
<content type='text'>
Recent patch [1] renames the save_live_complete_precopy handler to
save_complete, as the machine is not live in most cases when this
handler is executed. The same is true also for
save_live_complete_precopy_thread, therefore this patch removes the
"live" keyword from the handler itself and related types to keep the
naming unified.

In contrast to save_complete, this handler is only executed at the end
of precopy, therefore the "precopy" keyword is retained.

[1]: https://lore.kernel.org/all/20250613140801.474264-7-peterx@redhat.com/

Cc: Alex Williamson &lt;alex.williamson@redhat.com&gt;
Cc: Cédric Le Goater &lt;clg@redhat.com&gt;
Signed-off-by: Juraj Marcin &lt;jmarcin@redhat.com&gt;
Link: https://lore.kernel.org/r/20250626085235.294690-1-jmarcin@redhat.com
Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Fabiano Rosas &lt;farosas@suse.de&gt;
</content>
</entry>
<entry>
<title>migration: Add save_live_complete_precopy_thread handler</title>
<updated>2025-03-06T05:47:33+00:00</updated>
<author>
<name>Maciej S. Szmigiero</name>
<email>maciej.szmigiero@oracle.com</email>
</author>
<published>2025-03-04T22:03:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=8305921a91a940023fe971c74eb1e06f2725ebab'/>
<id>urn:sha1:8305921a91a940023fe971c74eb1e06f2725ebab</id>
<content type='text'>
This SaveVMHandler helps device provide its own asynchronous transmission
of the remaining data at the end of a precopy phase via multifd channels,
in parallel with the transfer done by save_live_complete_precopy handlers.

These threads are launched only when multifd device state transfer is
supported.

Management of these threads in done in the multifd migration code,
wrapping them in the generic thread pool.

Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Link: https://lore.kernel.org/qemu-devel/eac74a4ca7edd8968bbf72aa07b9041c76364a16.1741124640.git.maciej.szmigiero@oracle.com
Signed-off-by: Cédric Le Goater &lt;clg@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration/multifd: Add multifd_device_state_supported()</title>
<updated>2025-03-06T05:47:33+00:00</updated>
<author>
<name>Maciej S. Szmigiero</name>
<email>maciej.szmigiero@oracle.com</email>
</author>
<published>2025-03-04T22:03:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=a1131aa94256d1007b4267ff9e79c3b4ada6e2b9'/>
<id>urn:sha1:a1131aa94256d1007b4267ff9e79c3b4ada6e2b9</id>
<content type='text'>
Since device state transfer via multifd channels requires multifd
channels with packets and is currently not compatible with multifd
compression add an appropriate query function so device can learn
whether it can actually make use of it.

Reviewed-by: Fabiano Rosas &lt;farosas@suse.de&gt;
Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
Link: https://lore.kernel.org/qemu-devel/1ff0d98b85f470e5a33687406e877583b8fab74e.1741124640.git.maciej.szmigiero@oracle.com
Signed-off-by: Cédric Le Goater &lt;clg@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration/multifd: Make MultiFDSendData a struct</title>
<updated>2025-03-06T05:47:33+00:00</updated>
<author>
<name>Peter Xu</name>
<email>peterx@redhat.com</email>
</author>
<published>2025-03-04T22:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=99fab22350e4eed1d8a238ed97c77b1a5ee77dd4'/>
<id>urn:sha1:99fab22350e4eed1d8a238ed97c77b1a5ee77dd4</id>
<content type='text'>
The newly introduced device state buffer can be used for either storing
VFIO's read() raw data, but already also possible to store generic device
states.  After noticing that device states may not easily provide a max
buffer size (also the fact that RAM MultiFDPages_t after all also want to
have flexibility on managing offset[] array), it may not be a good idea to
stick with union on MultiFDSendData.. as it won't play well with such
flexibility.

Switch MultiFDSendData to a struct.

It won't consume a lot more space in reality, after all the real buffers
were already dynamically allocated, so it's so far only about the two
structs (pages, device_state) that will be duplicated, but they're small.

With this, we can remove the pretty hard to understand alloc size logic.
Because now we can allocate offset[] together with the SendData, and
properly free it when the SendData is freed.

[MSS: Make sure to clear possible device state payload before freeing
MultiFDSendData, remove placeholders for other patches not included]

Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
Acked-by: Fabiano Rosas &lt;farosas@suse.de&gt;
Link: https://lore.kernel.org/qemu-devel/7b02baba8e6ddb23ef7c349d312b9b631db09d7e.1741124640.git.maciej.szmigiero@oracle.com
Signed-off-by: Cédric Le Goater &lt;clg@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration/multifd: Device state transfer support - send side</title>
<updated>2025-03-06T05:47:33+00:00</updated>
<author>
<name>Maciej S. Szmigiero</name>
<email>maciej.szmigiero@oracle.com</email>
</author>
<published>2025-03-04T22:03:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=0525b91a0b993f95d29b2ea84155e7e4366c120e'/>
<id>urn:sha1:0525b91a0b993f95d29b2ea84155e7e4366c120e</id>
<content type='text'>
A new function multifd_queue_device_state() is provided for device to queue
its state for transmission via a multifd channel.

Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Maciej S. Szmigiero &lt;maciej.szmigiero@oracle.com&gt;
Link: https://lore.kernel.org/qemu-devel/ebd55768d3e5fecb5eb3f197bad9c0c07e5bc084.1741124640.git.maciej.szmigiero@oracle.com
Signed-off-by: Cédric Le Goater &lt;clg@redhat.com&gt;
</content>
</entry>
</feed>
