aboutsummaryrefslogtreecommitdiff
path: root/migration/migration.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2015-11-05 18:10:50 +0000
committerJuan Quintela <quintela@redhat.com>2015-11-10 15:00:26 +0100
commit7b89bf279f16c093ed46845b8e6e0fb61b7ef639 (patch)
treee51d8fa0e0ed277cca19eccacee4cffa26c38899 /migration/migration.c
parent70b2047774231ba2cb672eb936e12f603fa644aa (diff)
Rework loadvm path for subloops
Postcopy needs to have two migration streams loading concurrently; one from memory (with the device state) and the other from the fd with the memory transactions. Split the core of qemu_loadvm_state out so we can use it for both. Allow the inner loadvm loop to quit and cause the parent loops to exit as well. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'migration/migration.c')
-rw-r--r--migration/migration.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/migration/migration.c b/migration/migration.c
index 295deb8a2d..e4f91a98f4 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -98,12 +98,14 @@ MigrationIncomingState *migration_incoming_state_new(QEMUFile* f)
mis_current->from_src_file = f;
QLIST_INIT(&mis_current->loadvm_handlers);
qemu_mutex_init(&mis_current->rp_mutex);
+ qemu_event_init(&mis_current->main_thread_load_event, false);
return mis_current;
}
void migration_incoming_state_destroy(void)
{
+ qemu_event_destroy(&mis_current->main_thread_load_event);
loadvm_free_handlers(mis_current);
g_free(mis_current);
mis_current = NULL;