tools/libxl: Add back channel to allow migration target send data back
authorWen Congyang <wency@cn.fujitsu.com>
Wed, 15 Jul 2015 07:45:45 +0000 (15:45 +0800)
committerChanglong Xie <xiecl.fnst@cn.fujitsu.com>
Fri, 1 Apr 2016 03:07:28 +0000 (11:07 +0800)
commita1d8b4bcd8ba2c421543baff4db6fba468401907
tree8a55d7cc81136a4c28564a1326d209eb98ab0422
parentc0067c74687ed678505046a8cecae2021891bba6
tools/libxl: Add back channel to allow migration target send data back

In COLO mode, secondary needs to send the following data to primary:
1. In libxl
   Secondary sends the following CHECKPOINT_CONTEXT to primary:
   CHECKPOINT_SVM_SUSPENDED, CHECKPOINT_SVM_READY and CHECKPOINT_SVM_RESUMED
2. In libxc
   Secondary sends the dirty pfn list to primary

But the io_fd only can be written in primary, and only can be read in
secondary. Save recv_fd in domain_suspend_state, and send_fd in
domain_create_state. Extend libxl_domain_create_restore API, add a
send_fd param to it. Add LIBXL_HAVE_CREATE_RESTORE_SEND_FD to indicate
the API change.

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: Wei Liu <wei.liu2@citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.h
tools/libxl/xl_cmdimpl.c
tools/ocaml/libs/xl/xenlight_stubs.c