From 7b89bf279f16c093ed46845b8e6e0fb61b7ef639 Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Thu, 5 Nov 2015 18:10:50 +0000 Subject: 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 Reviewed-by: Juan Quintela Reviewed-by: Amit Shah Signed-off-by: Juan Quintela --- include/migration/migration.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/migration/migration.h') 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 */ -- cgit v1.2.3