@@ -279,6 +279,9 @@ void migration_incoming_state_destroy(void)
g_array_free(mis->postcopy_remote_fds, TRUE);
mis->postcopy_remote_fds = NULL;
}
+ if (mis->transport_cleanup) {
+ mis->transport_cleanup(mis->transport_data);
+ }
qemu_event_reset(&mis->main_thread_load_event);
@@ -49,6 +49,10 @@ struct PostcopyBlocktimeContext;
struct MigrationIncomingState {
QEMUFile *from_src_file;
+ /* A hook to allow cleanup at the end of incoming migration */
+ void *transport_data;
+ void (*transport_cleanup)(void *data);
+
/*
* Free at the start of the main state load, set as the main thread finishes
* loading state.