On 26.06.26 19:46, Andrey Drobyshev wrote:
v2 -> v3:Re-design device ownership hand-off (suggested by Dongli). Do not rely on SETUP migration notifiers, as this approach forces us to reorder generic migration code (see v2 discussion). Instead: * .pre_save() releases ownership on the source (RESET_OWNER) once VM is stopped; * .realize() is adjusted to defer device ownership acquisition for an incoming CPR; * .post_load() actually claims the device (VHOST_SET_OWNER); * FAILED migration event callback re-aquires the ownership on the source after re_save released it. v2:https://lore.kernel.org/qemu-devel/[email protected]
Hi! Two notes: 1. Did you consider migrating needed FDs through main migration channel, without use of CPR, like I do in (not yet landed) "[PATCH v19 00/15] virtio-net: live-TAP local migration" [1] 2. I don't know how much vhost-vsock differs from vhost-net, but for vhost-net I remember that RESET_OWNER + SET_OWNER is effectively equal to simply recreating vhost device on target, because in kernel vhost device is hardly bound to the process itself, and can't be passed to another process. So, we can pass only "empty" FD, not the initialized vhost device. That's why in [1] I only pass tap-fds (and some additional state), but vhost fds are simply reopened on target (or passed by mgmt app). Does vhost-vsock work in a different way? Is there real sense in passing vhost fds here? [1] https://lore.kernel.org/qemu-devel/[email protected]/ -- Best regards, Vladimir
