On Thu, Dec 12, 2024 at 11:53:42PM +0100, Maciej S. Szmigiero wrote: > migrate_set_error() wouldn't be called until qemu_loadvm_state() exits > into process_incoming_migration_co(). > > Also this does not account other qemu_loadvm_state() callers like > qmp_xen_load_devices_state() or load_snapshot(). > > While these other callers might not use load threads currently, it feels > wrong to wait for these threads in qemu_loadvm_state() but set their > termination/abort flag as a side effect of completely different function > (migrate_set_error()). > > Having a dedicated abort flag also makes the semantics easy to infer > from code since once can simply grep for this flag name (load_threads_abort) > to see where it is being written. > > Its name is also pretty descriptive making it easy to immediately tell > what it does.
That's fine. As long as we can at least report an Error** and remember that it's OK to me. Thanks, -- Peter Xu