On 09.10.25 22:09, Raphael Norwitz wrote:
A few nits. Looks like there has been some churn here so this patch
will need to be rebased.
On Wed, Aug 13, 2025 at 1:01 PM Vladimir Sementsov-Ogievskiy
<[email protected]> wrote:
Add logic to transfer virtio notifiers through migration channel
for vhost backend migration case.
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
---
[..]
@@ -3317,6 +3340,10 @@ virtio_load(VirtIODevice *vdev, QEMUFile *f, int
version_id)
}
}
+ if (migrating_backend) {
nit: spurious spaces after &vdev->config_notifier
Oh, kept in v2) Will fix.
+ event_notifier_init_fd(&vdev->config_notifier , qemu_file_get_fd(f));
+ }
+
virtio_notify_vector(vdev, VIRTIO_NO_VECTOR);
if (vdc->load != NULL) {
[..]
@@ -3394,6 +3434,18 @@ virtio_load(VirtIODevice *vdev, QEMUFile *f, int
version_id)
continue;
}
+ if (migrating_backend) {
+ /*
"prior to backend migration"?
Right, will fix.
+ * Indices are not synced prior backend migration (as we don't
+ * stop vrings by GET_VRING_BASE). No reason to sync them now,
+ * and do any checks.
+ */
+ vdev->vq[i].used_idx = 0;
+ vdev->vq[i].shadow_avail_idx = 0;
+ vdev->vq[i].inuse = 0;
+ continue;
+ }
[..]
--
Best regards,
Vladimir