Files
cloud-hypervisor/virtio-devices
Peter Delevoryas 5b68d7694d virtio-devices: Replay in-order vhost-user queues after reconnect
When reconnecting to a vhost-user backend, Cloud Hypervisor keeps the
same queues and currently restarts them from avail_idx.

That can skip descriptors that were made available by the guest but not
completed before the old backend crashed. For queues where
VIRTIO_F_IN_ORDER was negotiated, used_idx is a safe completion
boundary, so reconnect can resume from used_idx and kick the queue if
work remains.

Do not do this when inflight tracking is active, because the backend
inflight state is the more precise recovery mechanism. Also leave queues
without VIRTIO_F_IN_ORDER on the existing avail_idx path, since used_idx
does not identify which descriptors completed for out-of-order devices.

Signed-off-by: Peter Delevoryas <pdel@meta.com>
2026-07-18 19:18:40 +00:00
..