|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 COLOPre 18/26] tools/libx{l, c}: add postcopy/suspend callback to restore side
On Thu, 2015-06-25 at 14:25 +0800, Yang Hongyang wrote:
> Secondary(restore side) is running under COLO, we also need
> postcopy/suspend callbacks.
I wonder if this and the previous patch ought to be folded into the
patches which introduce the actual use of the callback?
>
> Signed-off-by: Yang Hongyang <yanghy@xxxxxxxxxxxxxx>
> ---
> tools/libxc/include/xenguest.h | 10 ++++++++++
> tools/libxl/libxl_save_msgs_gen.pl | 4 ++--
> 2 files changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h
> index e804a1d..dcc441a 100644
> --- a/tools/libxc/include/xenguest.h
> +++ b/tools/libxc/include/xenguest.h
> @@ -114,6 +114,16 @@ struct restore_callbacks {
> int (*toolstack_restore)(uint32_t domid, const uint8_t *buf,
> uint32_t size, void* data);
>
> + /* Called after a new checkpoint to suspend the guest.
> + */
> + int (*suspend)(void* data);
> +
> + /* Called after the secondary vm is ready to resume.
> + * Callback function resumes the guest & the device model,
> + * returns to xc_domain_restore.
> + */
> + int (*postcopy)(void* data);
> +
> /* A checkpoint record has been found in the stream */
> int (*checkpoint)(void* data);
>
> diff --git a/tools/libxl/libxl_save_msgs_gen.pl
> b/tools/libxl/libxl_save_msgs_gen.pl
> index 7284975..86cd395 100755
> --- a/tools/libxl/libxl_save_msgs_gen.pl
> +++ b/tools/libxl/libxl_save_msgs_gen.pl
> @@ -23,8 +23,8 @@ our @msgs = (
> STRING doing_what),
> 'unsigned long', 'done',
> 'unsigned long', 'total'] ],
> - [ 3, 'scxA', "suspend", [] ],
> - [ 4, 'scxA', "postcopy", [] ],
> + [ 3, 'srcxA', "suspend", [] ],
> + [ 4, 'srcxA', "postcopy", [] ],
> [ 5, 'srcxA', "checkpoint", [] ],
> [ 6, 'srcxA', "should_checkpoint", [] ],
> [ 7, 'scxA', "switch_qemu_logdirty", [qw(int domid
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |