libvhost-user: fix postcopy shared memory faults
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | libvhost-user: accept the postcopy client base ack in vu_add_mem_reg()subprojects/ | +14 | 0 replies | |
| 2/2 | libvhost-user: return the backend mapping address for added regionssubprojects/ | +7 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] libvhost-user: fix postcopy shared memory faults
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(-)
Signature · 1 line
2.50.1 (Apple Git-155)