summaryrefslogtreecommitdiff
path: root/include/migration/migration.h
diff options
context:
space:
mode:
authorzhanghailiang <zhang.zhanghailiang@huawei.com>2016-10-27 14:42:55 +0800
committerAmit Shah <amit@amitshah.net>2016-10-30 15:17:39 +0530
commit25d0c16f625feb3b6b9bf8079388cdd314e63916 (patch)
treef216697734a529d4b33828e19916f82acce12636 /include/migration/migration.h
parent0b827d5e7291193887d22d058bc20c12b423047c (diff)
downloadqemu-25d0c16f625feb3b6b9bf8079388cdd314e63916.zip
migration: Switch to COLO process after finishing loadvm
Switch from normal migration loadvm process into COLO checkpoint process if COLO mode is enabled. We add three new members to struct MigrationIncomingState, 'have_colo_incoming_thread' and 'colo_incoming_thread' record the COLO related thread for secondary VM, 'migration_incoming_co' records the original migration incoming coroutine. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Amit Shah <amit@amitshah.net>
Diffstat (limited to 'include/migration/migration.h')
-rw-r--r--include/migration/migration.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/migration/migration.h b/include/migration/migration.h
index 34f442b2b3..c309d23370 100644
--- a/include/migration/migration.h
+++ b/include/migration/migration.h
@@ -21,6 +21,7 @@
#include "migration/vmstate.h"
#include "qapi-types.h"
#include "exec/cpu-common.h"
+#include "qemu/coroutine_int.h"
#define QEMU_VM_FILE_MAGIC 0x5145564d
#define QEMU_VM_FILE_VERSION_COMPAT 0x00000002
@@ -107,6 +108,12 @@ struct MigrationIncomingState {
QEMUBH *bh;
int state;
+
+ bool have_colo_incoming_thread;
+ QemuThread colo_incoming_thread;
+ /* The coroutine we should enter (back) after failover */
+ Coroutine *migration_incoming_co;
+
/* See savevm.c */
LoadStateEntry_Head loadvm_handlers;
};