<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/qemu.git/migration, 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>2026-08-29T08:07:45+00:00</updated>
<entry>
<title>monitor: move HMP-specific to monitor-hmp-internal.h</title>
<updated>2026-08-29T08:07:45+00:00</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2026-08-28T12:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=b818e58ac419a41735d480da5c1de8a104e7f59c'/>
<id>urn:sha1:b818e58ac419a41735d480da5c1de8a104e7f59c</id>
<content type='text'>
Move HMP-specific declarations to its own CONFIG_HMP guarded header.

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@oss.qualcomm.com&gt;
Reviewed-by: Dr. David Alan Gilbert &lt;dave@treblig.org&gt;
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-ID: &lt;20260828-qemu-no-hmp-v5-48-9227de146347@redhat.com&gt;
</content>
</entry>
<entry>
<title>build-sys: make HMP source files conditional on have_hmp</title>
<updated>2026-08-29T08:07:45+00:00</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2026-08-28T12:04:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=34c5de5c6d6049b7cd0d475a32da8760f35c0ab5'/>
<id>urn:sha1:34c5de5c6d6049b7cd0d475a32da8760f35c0ab5</id>
<content type='text'>
Exclude all *-hmp-cmds.c files and HMP-only source files from the
build when HMP is disabled.

Also conditionalise the hmp-commands.hx header generation and the
test-hmp qtest.

Acked-by: Dr. David Alan Gilbert &lt;dave@treblig.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@oss.qualcomm.com&gt;
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-ID: &lt;20260828-qemu-no-hmp-v5-45-9227de146347@redhat.com&gt;
</content>
</entry>
<entry>
<title>Guard HMP command implementations with CONFIG_HMP</title>
<updated>2026-08-29T08:07:45+00:00</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2026-08-28T12:04:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=0bd6562fc3e54d6d96db1f7bc5188da512249349'/>
<id>urn:sha1:0bd6562fc3e54d6d96db1f7bc5188da512249349</id>
<content type='text'>
Add #ifdef CONFIG_HMP around all hmp_* function implementations and
their HMP-only helpers across subsystems.

This covers monitor_register_hmp* callers, hmp_info_* handlers, and
HMP-only helper functions like slirp_lookup.

To link succesfully, use empty cmds tables in hmp-cmds.c (to be removed
once meson build-sys is updated with !hmp support later in the series)

Reviewed-by: Jason J. Herne &lt;jjherne@linux.ibm.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-ID: &lt;20260828-qemu-no-hmp-v5-41-9227de146347@redhat.com&gt;
</content>
</entry>
<entry>
<title>monitor: tighten monitor_printf*()</title>
<updated>2026-08-29T08:07:45+00:00</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2026-08-28T12:04:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=f3900cfb0cddd2fcc3b9db20f52f3755e6ed962f'/>
<id>urn:sha1:f3900cfb0cddd2fcc3b9db20f52f3755e6ed962f</id>
<content type='text'>
Rename monitor_printf-&gt;monitor_hmp_printf, monitor_vprintf-&gt;
monitor_hmp_vprintf, and monitor_printc-&gt;monitor_hmp_printc, changing
the first parameter from Monitor * to MonitorHMP * to enforce type
safety. The implementation is also simplified: monitor_hmp_vprintf now
directly calls g_strdup_vprintf + monitor_puts, removing the virtual
dispatch via moncls-&gt;vprintf.

The dev_print() callbacks are temporarily using the MONITOR_HMP(mon)
cast, they are fixed in the following commits.

Early return in qemu_vprintf() if "hmp" is NULL, relying on
monitor_hmp_vprintf() handling NULL case is a bit uncommon.

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@oss.qualcomm.com&gt;
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-ID: &lt;20260828-qemu-no-hmp-v5-37-9227de146347@redhat.com&gt;
</content>
</entry>
<entry>
<title>monitor: make hmp_handle_error() take MonitorHMP</title>
<updated>2026-08-29T08:07:44+00:00</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2026-08-28T12:04:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=06c1600b5571af9ece3c6b5ef7d36d59267dc171'/>
<id>urn:sha1:06c1600b5571af9ece3c6b5ef7d36d59267dc171</id>
<content type='text'>
Mostly mechanical, with a few adjustments around it.

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@oss.qualcomm.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Dr. David Alan Gilbert &lt;dave@treblig.org&gt;
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-ID: &lt;20260828-qemu-no-hmp-v5-32-9227de146347@redhat.com&gt;
</content>
</entry>
<entry>
<title>monitor: change HMPCommand cmd to take MonitorHMP</title>
<updated>2026-08-29T08:07:44+00:00</updated>
<author>
<name>Marc-André Lureau</name>
<email>marcandre.lureau@redhat.com</email>
</author>
<published>2026-08-28T12:04:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=139ffc1039d9f23cc2d948d45183d0932595c73a'/>
<id>urn:sha1:139ffc1039d9f23cc2d948d45183d0932595c73a</id>
<content type='text'>
HMP commands are specific to the HMP monitor, so make the cmd function
pointer in HMPCommand take MonitorHMP * instead of Monitor *. This
strengthens type safety and makes the HMP-specific nature of these
handlers explicit.

Handler functions are renamed to take MonitorHMP *hmp, with a local
Monitor *mon = MONITOR(hmp) added where the body needs the base type.
Following patches will drop it, since most functions are HMP specific.

Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Jason J. Herne &lt;jjherne@linux.ibm.com&gt;
Reviewed-by: Dr. David Alan Gilbert &lt;dave@treblig.org&gt;
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-ID: &lt;20260828-qemu-no-hmp-v5-31-9227de146347@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration/postcopy: fix page_requested leak for vhost-user shared pages</title>
<updated>2026-08-28T12:09:32+00:00</updated>
<author>
<name>hongmianquan</name>
<email>hongmianquan@bytedance.com</email>
</author>
<published>2026-08-24T12:26:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=96e7412cd5581edf6bd3b966afa3abeb53b5a6a9'/>
<id>urn:sha1:96e7412cd5581edf6bd3b966afa3abeb53b5a6a9</id>
<content type='text'>
With postcopy-preempt enabled, a postcopy migration of a guest with a
vhost-user device can hang at the very end on the destination, after all
pages are transferred (query-migrate: status=postcopy-active, remaining=0).

Root cause is an add/del key mismatch on mis-&gt;page_requested:

- add: a backend fault goes through postcopy_request_shared_page() -&gt;
  postcopy_request_page() -&gt; migrate_send_rp_req_pages(), which inserts
  the request and bumps page_requested_count keyed by client_addr.
- del: qemu_ufd_copy_ioctl() removes the entry and drops the counter
  keyed by this QEMU process's host address for the page.

client_addr is a VA in the external vhost-user backend's address space and
never equals QEMU's host address, so the removal misses and the counter
leaks. postcopy_ram_incoming_cleanup() then waits for it to reach zero
forever, which also stalls the source (it waits for the return path).

Racing threads:
  dst: postcopy_ram_listen_thread -&gt; postcopy_ram_incoming_cleanup -&gt;
       qemu_cond_wait_impl              (waits for page_requested_count==0)
       (postcopy_preempt_thread already placed/woke the pages)
  src: migration_thread -&gt; migration_completion -&gt;
       await_return_path_close_on_source -&gt; qemu_thread_join
       (source_return_path_thread blocked in recvmsg)

The leak is only triggered when the vhost-user backend faults on a page
that has not been received yet: only then does the request take the
shared-fault slow path and register an entry in page_requested. If that
page is subsequently delivered while the request is still outstanding,
its entry is never removed. (Pages already present when the backend
faults just take the wake path and never register.) So a run may leak
only a few entries (9 of ~244k requests in our repro) yet still hang.

Fix: key the request with the same host address the removal uses
(rb-&gt;host + aligned_rbo) instead of client_addr. The backend wake still
happens at placement time via postcopy_wake_shared().

Signed-off-by: hongmianquan &lt;hongmianquan@bytedance.com&gt;
Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Fabiano Rosas &lt;farosas@suse.de&gt;
</content>
</entry>
<entry>
<title>migration: Harden vmstate_size</title>
<updated>2026-08-28T12:09:32+00:00</updated>
<author>
<name>Fabiano Rosas</name>
<email>farosas@suse.de</email>
</author>
<published>2026-08-18T18:24:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=595273f1b71e7de40867223d1566be8355353921'/>
<id>urn:sha1:595273f1b71e7de40867223d1566be8355353921</id>
<content type='text'>
Protect vmstate_size against overflow of the on-stack 64bit integer
during multiplication. The data at size_indirect.offset comes from the
migration stream.

Acked-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Fabiano Rosas &lt;farosas@suse.de&gt;
</content>
</entry>
<entry>
<title>migration: Harden vmstate_handle_alloc</title>
<updated>2026-08-28T12:09:32+00:00</updated>
<author>
<name>Fabiano Rosas</name>
<email>farosas@suse.de</email>
</author>
<published>2026-08-18T18:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=c3b99f3091d0c840c33fc204c8dacdb599abc83d'/>
<id>urn:sha1:c3b99f3091d0c840c33fc204c8dacdb599abc83d</id>
<content type='text'>
Harden the vmstate_handle_alloc function against overflow of the 64bit
integers it consumes and failure to allocate due to an exceedingly
large request.

Acked-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Fabiano Rosas &lt;farosas@suse.de&gt;
</content>
</entry>
<entry>
<title>migration: Check more vmstate flags</title>
<updated>2026-08-28T12:09:31+00:00</updated>
<author>
<name>Fabiano Rosas</name>
<email>farosas@suse.de</email>
</author>
<published>2026-08-18T18:24:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/virt/qemu/qemu.git/commit/?id=728d945ea07d5961733059604dcc608ec132dde6'/>
<id>urn:sha1:728d945ea07d5961733059604dcc608ec132dde6</id>
<content type='text'>
Add more checks for vmstate flags constraints.

Acked-by: Peter Xu &lt;peterx@redhat.com&gt;
Signed-off-by: Fabiano Rosas &lt;farosas@suse.de&gt;
</content>
</entry>
</feed>
