Message ID | 1457080891-26054-14-git-send-email-xiecl.fnst@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Changlong Xie writes ("[PATCH v11 13/27] tools/libx{l,c}: add postcopy/suspend callback to restore side"): > From: Wen Congyang <wency@cn.fujitsu.com> > > Secondary(restore side) is running under COLO, we also need > postcopy/suspend callbacks. This patch does not provide an implementation of any of these callbacks, nor a call site. I think you need to mention that in the commit message. You should also explain what would currently happen in libxl if these callbacks were to be called. Ian.
On 03/05/2016 01:05 AM, Ian Jackson wrote: > Changlong Xie writes ("[PATCH v11 13/27] tools/libx{l,c}: add postcopy/suspend callback to restore side"): >> From: Wen Congyang <wency@cn.fujitsu.com> >> >> Secondary(restore side) is running under COLO, we also need >> postcopy/suspend callbacks. > > This patch does not provide an implementation of any of these > callbacks, nor a call site. > > I think you need to mention that in the commit message. You should > also explain what would currently happen in libxl if these callbacks > were to be called. I will merge it in the implement patch in next version Thanks -Xie > > Ian. > > > . >
diff --git a/tools/libxc/include/xenguest.h b/tools/libxc/include/xenguest.h index f598bec..cb0bbcf 100644 --- a/tools/libxc/include/xenguest.h +++ b/tools/libxc/include/xenguest.h @@ -101,6 +101,16 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter /* callbacks provided by xc_domain_restore */ struct restore_callbacks { + /* 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. * returns: */ #define XGR_CHECKPOINT_ERROR 0 /* Terminate processing */ diff --git a/tools/libxl/libxl_save_msgs_gen.pl b/tools/libxl/libxl_save_msgs_gen.pl index 51d004d..6016706 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', "wait_checkpoint", [] ], [ 7, 'scxA', "switch_qemu_logdirty", [qw(int domid