summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorAndrey Drobyshev <andrey.drobyshev@virtuozzo.com>2026-07-20 13:22:39 +0300
committerMichael S. Tsirkin <mst@redhat.com>2026-08-03 23:08:16 -0400
commit863c6d539ac64ec3fb1e08a4e2fe7f5aa7d1a781 (patch)
tree71e6d7d5dcbe0a55fbb3d9247cd8e72f7c6802da /scripts/Makefile.thinlto
parent7c4fedf10a831b471dd94ab7bed499c305db27c9 (diff)
downloadlinux-next-863c6d539ac64ec3fb1e08a4e2fe7f5aa7d1a781.tar.gz
linux-next-863c6d539ac64ec3fb1e08a4e2fe7f5aa7d1a781.zip
vhost/vsock: re-scan TX virtqueue on device start
During QEMU CPR live-update (and VHOST_RESET_OWNER in general) the guest keeps running while the host drops and later re-attaches vhost backends. If the guest adds a buffer to the TX virtqueue (guest->host) and kicks while the backend is temporarily NULL (between vhost_vsock_drop_backends() and the next vhost_vsock_start()), then the kick is delivered to the vhost worker, handle_tx_kick() sees a NULL backend and returns, and the kick signal is consumed. The buffer is then left in the ring. Then upon device start vhost_vsock_start() only re-kicks the RX send worker, never the TX VQ, so the buffer is processed only if the guest happens to kick again. But if the guest itself is now waiting for data from the host, it will never kick TX VQ again, and we end up in a deadlock. The issue itself is pre-existing, but it only manifests during a device pause caused by VHOST_RESET_OWNER. Namely, the deadlock is reproduced during active host->guest socat data transfer under multiple consecutive CPR live-update's. To fix this, in vhost_vsock_start(), after kicking the RX send worker, also queue the TX vq poll so any buffers the guest enqueued while we were paused get scanned. The VHOST_RESET_OWNER ioctl itself is implemented in the following patch, thus this patch is a preparation to support VHOST_RESET_OWNER. Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Message-ID: <20260720102241.371610-4-andrey.drobyshev@virtuozzo.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions