diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-11-09 19:06:25 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-11-09 19:06:25 +0000 |
commit | b6119955dfa6c4bf49f47946810bd49245361609 (patch) | |
tree | 431dcd6911972662946bf4c6edf048c63a95b5d3 /tools/libxc/xenguest.h | |
parent | 4a6d50ad69a6469bde719b4b6ebe7978775899f9 (diff) | |
download | xen-b6119955dfa6c4bf49f47946810bd49245361609.tar.gz xen-b6119955dfa6c4bf49f47946810bd49245361609.tar.bz2 xen-b6119955dfa6c4bf49f47946810bd49245361609.zip |
Remus: Add callbacks for suspend, postcopy and preresume in xc_domain_save.
This makes it possible to perform repeated checkpoints.
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
Diffstat (limited to 'tools/libxc/xenguest.h')
-rw-r--r-- | tools/libxc/xenguest.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/libxc/xenguest.h b/tools/libxc/xenguest.h index b7cf6beb84..6ada19af00 100644 --- a/tools/libxc/xenguest.h +++ b/tools/libxc/xenguest.h @@ -14,6 +14,19 @@ #define XCFLAGS_HVM 4 #define XCFLAGS_STDVGA 8 +/* callbacks provided by xc_domain_save */ +struct save_callbacks { + int (*suspend)(void* data); + /* callback to rendezvous with external checkpoint functions */ + int (*postcopy)(void* data); + /* returns: + * 0: terminate checkpointing gracefully + * 1: take another checkpoint */ + int (*checkpoint)(void* data); + + /* to be provided as the first argument to each callback function */ + void* data; +}; /** * This function will save a running domain. @@ -25,8 +38,8 @@ */ int xc_domain_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters, uint32_t max_factor, uint32_t flags /* XCFLAGS_xxx */, - int (*suspend)(void), int hvm, - void (*switch_qemu_logdirty)(int, unsigned)); /* HVM only */ + struct save_callbacks* callbacks, + int hvm, void (*switch_qemu_logdirty)(int, unsigned)); /* HVM only */ /** |