On 1/15/2024 1:48 AM, Peter Xu wrote: > On Fri, Jan 12, 2024 at 07:05:03AM -0800, Steve Sistare wrote: >> bool migration_in_incoming_postcopy(void) >> diff --git a/ui/spice-core.c b/ui/spice-core.c >> index b3cd229..e43a93f 100644 >> --- a/ui/spice-core.c >> +++ b/ui/spice-core.c >> @@ -580,7 +580,7 @@ static int migration_state_notifier(NotifierWithReturn >> *notifier, >> if (migration_in_setup(s)) { >> spice_server_migrate_start(spice_server); >> } else if (migration_has_finished(s) || >> - migration_in_postcopy_after_devices(s)) { >> + migration_in_postcopy_after_devices()) { > > This can be a reply also to your other email: my previous suggestion of > using PRECOPY_DONE should apply here, where we can convert this chunk into: > > } else if (event == MIG_EVENT_PRECOPY_DONE) {...} > > Because PRECOPY_DONE should also cover the notification from > postcopy_start(), then we can drop migration_in_postcopy_after_devices() > completely, I think.
Yes, that works. I will define and use MIG_EVENT_PRECOPY_DONE and friends in "MigrationEvent for notifiers". - Steve