tools/libxl: introduction of libxl__qmp_restore to load qemu state
authorWen Congyang <wency@cn.fujitsu.com>
Mon, 14 Dec 2015 07:08:13 +0000 (15:08 +0800)
committerChanglong Xie <xiecl.fnst@cn.fujitsu.com>
Fri, 1 Apr 2016 03:07:28 +0000 (11:07 +0800)
commita0ddc0b359375b2418213966dfbdbfab593ecc6f
tree975ee530fea212764e0cf3dcdbccc552a8a96771
parent30318036c334e4fec673ec0256c0e608a3844a11
tools/libxl: introduction of libxl__qmp_restore to load qemu state

In normal migration, the qemu state is passed to qemu as a parameter.
With COLO, secondary vm is running. So we will do the following steps
at every checkpoint:
1. suspend both primary vm and secondary vm
2. sync the state
3. resume both primary vm and secondary vm
Primary will send qemu's state in step2, and secondary's qemu should
read it and restore the state before it is resumed. We can not pass the
state to qemu as a parameter because secondary QEMU is already started
at this point, so we introduce libxl__qmp_restore() to do it.

Signed-off-by: Yang Hongyang <hongyang.yang@easystack.cn>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
Cc: Anthony Perard <anthony.perard@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/libxl_internal.h
tools/libxl/libxl_qmp.c