aboutsummaryrefslogtreecommitdiff
path: root/migration/colo-comm.c
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 /migration/colo-comm.c
parent0b827d5e7291193887d22d058bc20c12b423047c (diff)
downloadqemu-25d0c16f625feb3b6b9bf8079388cdd314e63916.zip
qemu-25d0c16f625feb3b6b9bf8079388cdd314e63916.tar.gz
qemu-25d0c16f625feb3b6b9bf8079388cdd314e63916.tar.bz2
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 'migration/colo-comm.c')
-rw-r--r--migration/colo-comm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/migration/colo-comm.c b/migration/colo-comm.c
index a2d5185..bf44f76 100644
--- a/migration/colo-comm.c
+++ b/migration/colo-comm.c
@@ -49,3 +49,13 @@ void colo_info_init(void)
{
vmstate_register(NULL, 0, &colo_state, &colo_info);
}
+
+bool migration_incoming_enable_colo(void)
+{
+ return colo_info.colo_requested;
+}
+
+void migration_incoming_exit_colo(void)
+{
+ colo_info.colo_requested = false;
+}