summaryrefslogtreecommitdiff
path: root/include/migration
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 /include/migration
parent70b2047774231ba2cb672eb936e12f603fa644aa (diff)
downloadqemu-7b89bf279f16c093ed46845b8e6e0fb61b7ef639.tar.gz
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 'include/migration')
-rw-r--r--include/migration/migration.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 571466beb2..3dc95f49da 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -57,6 +57,12 @@ typedef QLIST_HEAD(, LoadStateEntry) LoadStateEntry_Head;
struct MigrationIncomingState {
QEMUFile *from_src_file;
+ /*
+ * Free at the start of the main state load, set as the main thread finishes
+ * loading state.
+ */
+ QemuEvent main_thread_load_event;
+
QEMUFile *to_src_file;
QemuMutex rp_mutex; /* We send replies from multiple threads */