COLO: Load VMState into QIOChannelBuffer before restore it
commit4291d372e22425e6e8b45466b46a051c82ac4ce1
authorzhanghailiang <zhang.zhanghailiang@huawei.com>
Thu, 27 Oct 2016 06:43:00 +0000 (27 14:43 +0800)
committerAmit Shah <amit@amitshah.net>
Sun, 30 Oct 2016 09:47:39 +0000 (30 15:17 +0530)
treeffa5e2169b80abfba40584bb7e1718bec5b0c2b1
parenta91246c95f913dc6fd391eee32f6c9796de70183
COLO: Load VMState into QIOChannelBuffer before restore it

We should not destroy the state of SVM (Secondary VM) until we receive
the complete data of PVM's state, in case the primary fails in the process
of sending the state, so we cache the VM's state in secondary side before
load it into SVM.

Besides, we should call qemu_system_reset() before load VM state,
which can ensure the data is intact.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Amit Shah <amit@amitshah.net>
migration/colo.c