All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] libvhost-user: fix postcopy shared memory faults
@ 2026-08-13  9:54 Bin Guo
  2026-08-13  9:55 ` [PATCH 1/2] libvhost-user: accept the postcopy client base ack in vu_add_mem_reg() Bin Guo
  2026-08-13  9:55 ` [PATCH 2/2] libvhost-user: return the backend mapping address for added regions Bin Guo
  0 siblings, 2 replies; 3+ messages in thread
From: Bin Guo @ 2026-08-13  9:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S . Tsirkin, Stefano Garzarella

These two independent bugs both sit on the libvhost-user postcopy path and
together make postcopy migration of a guest with a libvhost-user backend
fail.  They are only reachable when the backend negotiates
VHOST_USER_PROTOCOL_F_CONFIGURE_MEM_SLOTS, i.e. it adds memory regions one
by one with VHOST_USER_ADD_MEM_REG instead of VHOST_USER_SET_MEM_TABLE.

Patch 1 stops the backend from panicking on the "all postcopy client bases
received" ack, which QEMU sends as an fd-less VHOST_USER_ADD_MEM_REG.

Patch 2 makes the backend return its mapping address for a region added
that way, without which QEMU cannot translate the backend's fault
addresses back to a RAMBlock.

Reproduced and fixed with contrib/vhost-user-bridge as the net backend of
a postcopy migrated guest: before the series the destination backend
either panics or QEMU reports "Failed to find region for fault"; after it
the migration completes.

Bin Guo (2):
  libvhost-user: accept the postcopy client base ack in vu_add_mem_reg()
  libvhost-user: return the backend mapping address for added regions

 subprojects/libvhost-user/libvhost-user.c | 34 ++++++++++++++---------
 1 file changed, 21 insertions(+), 13 deletions(-)

-- 
2.50.1 (Apple Git-155)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-13  9:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-13  9:54 [PATCH 0/2] libvhost-user: fix postcopy shared memory faults Bin Guo
2026-08-13  9:55 ` [PATCH 1/2] libvhost-user: accept the postcopy client base ack in vu_add_mem_reg() Bin Guo
2026-08-13  9:55 ` [PATCH 2/2] libvhost-user: return the backend mapping address for added regions Bin Guo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.