On Tue, Oct 06, 2026 at 06:19:29PM +0300, Andrey Drobyshev wrote: > On 10/6/26 5:14 PM, Peter Xu wrote: > > On Tue, Oct 06, 2026 at 04:58:39PM +0300, Andrey Drobyshev wrote: > >> A device may take over a resource from the source in post_load(), e.g. > >> vhost-vsock acquires the device ownership on a CPR target. If the > >> incoming migration fails afterwards, there's currently no way for the > >> device to give that resource back before the source is told about the > >> failure, over the return path or via the MIGRATION event, and resumes, > >> or before the target exits. > >> > >> Add a notifier list for that, called from the failure path of > >> process_incoming_migration_co() before the failure is published. > >> > >> Signed-off-by: Andrey Drobyshev <[email protected]> > > > > Should we better reuse migration_state_notifiers[] and introduce > > MIG_EVENT_INCOMING_FAILED? > So far I can't see why this wouldn't work. Should be functionally > identical to what I've done in this and subsequent patches. So if you > think adding a separate event is cleaner - I can certainly go this way.
Yes I think it's cleaner. Not only because I want to reduce possible global list of notifies only to be used in migration (we still have another global notifier for postcopy that only vhost-user uses..), but also in this case you didn't introduce per-mode notifiers, stop matching with what the source notifiers can do. When reused, it should then only register it against CPR_TRANSFER|CPR_EXEC, IIUC. Thanks, -- Peter Xu
