mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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>