COLO: Send PVM state to secondary side when do checkpoint
commita91246c95f913dc6fd391eee32f6c9796de70183
authorzhanghailiang <zhang.zhanghailiang@huawei.com>
Thu, 27 Oct 2016 06:42:59 +0000 (27 14:42 +0800)
committerAmit Shah <amit@amitshah.net>
Sun, 30 Oct 2016 09:47:39 +0000 (30 15:17 +0530)
treebbfa9e8c3f2d209f13be5026a3d975dea126d664
parent21142ba7ffbf62bd8914af4595184415c50f8f39
COLO: Send PVM state to secondary side when do checkpoint

VM checkpointing is to synchronize the state of PVM to SVM, just
like migration does, we re-use save helpers to achieve migrating
PVM's state to Secondary side.

COLO need to cache the data of VM's state in the secondary side before
synchronize it to SVM. COLO need the size of the data to determine
how much data should be read in the secondary side.
So here, we can get the size of the data by saving it into I/O channel
before send it to the secondary side.

Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.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
migration/ram.c