secondary vm suspend/resume/checkpoint code
authorWen Congyang <wency@cn.fujitsu.com>
Tue, 15 Dec 2015 08:45:17 +0000 (16:45 +0800)
committerChanglong Xie <xiecl.fnst@cn.fujitsu.com>
Fri, 1 Apr 2016 03:07:28 +0000 (11:07 +0800)
commitc4f5894974f30fc6105c85e7551c3f39c1749092
tree11af212a58d30c574e771f15df55e17ffad1f4e7
parentf5d947bf1bb038f9f4f3ea9cdf7b35adf3fc768c
secondary vm suspend/resume/checkpoint code

Secondary vm is running in colo mode. So we will do
the following things again and again:
1. Resume secondary vm
   a. Send CHECKPOINT_SVM_READY to master.
   b. If it is not the first resume, call libxl__checkpoint_devices_preresume().
   c. If it is the first resume(resume right after live migration),
      - call libxl__xc_domain_restore_done() to build the secondary vm.
      - enable secondary vm's logdirty.
      - call libxl__domain_resume() to resume secondary vm.
      - call libxl__checkpoint_devices_setup() to setup checkpoint devices.
   d. Send CHECKPOINT_SVM_RESUMED to master.
2. Wait a new checkpoint
   a. Call libxl__checkpoint_devices_commit().
   b. Read CHECKPOINT_NEW from master.
3. Suspend secondary vm
   a. Suspend secondary vm.
   b. Call libxl__checkpoint_devices_postsuspend().
   c. Send CHECKPOINT_SVM_SUSPENDED to master.
4. Checkpoint
   a. Read emulator xenstore data and emulator context
   b. REC_TYPE_CHECKPOINT_END

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn>
Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/include/xenguest.h
tools/libxc/xc_sr_save.c
tools/libxl/Makefile
tools/libxl/libxl_colo.h [new file with mode: 0644]
tools/libxl/libxl_colo_restore.c [new file with mode: 0644]
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.h
tools/libxl/libxl_save_callout.c
tools/libxl/libxl_save_msgs_gen.pl
tools/libxl/libxl_stream_read.c
tools/libxl/libxl_types.idl