diff options
author | Shriram Rajagopalan <rshriram@cs.ubc.ca> | 2012-05-18 11:00:44 +0100 |
---|---|---|
committer | Shriram Rajagopalan <rshriram@cs.ubc.ca> | 2012-05-18 11:00:44 +0100 |
commit | d473b016fb7ab10d46fcfb37f990037ac0368a35 (patch) | |
tree | b866f568950dfc367a1e2121eab72a78c6304505 /tools/libxc/xenguest.h | |
parent | bea0ff6e774d171bf6acb451f75dc194f4002782 (diff) | |
download | xen-d473b016fb7ab10d46fcfb37f990037ac0368a35.tar.gz xen-d473b016fb7ab10d46fcfb37f990037ac0368a35.tar.bz2 xen-d473b016fb7ab10d46fcfb37f990037ac0368a35.zip |
libxl: Remus - suspend/postflush/commit callbacks
* Add libxl callback functions for Remus checkpoint suspend, postflush
(aka resume) and checkpoint commit callbacks.
* suspend callback is a stub that just bounces off
libxl__domain_suspend_common_callback - which suspends the domain and
saves the devices model state to a file.
* resume callback currently just resumes the domain (and the device model).
* commit callback just writes out the saved device model state to the
network and sleeps for the checkpoint interval.
* Introduce a new public API, libxl_domain_remus_start (currently a stub)
that sets up the network and disk buffer and initiates continuous
checkpointing.
* Future patches will augment these callbacks/functions with more functionalities
like issuing network buffer plug/unplug commands, disk checkpoint commands, etc.
Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/libxc/xenguest.h')
-rw-r--r-- | tools/libxc/xenguest.h | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/tools/libxc/xenguest.h b/tools/libxc/xenguest.h index 6435f659af..91d53f7426 100644 --- a/tools/libxc/xenguest.h +++ b/tools/libxc/xenguest.h @@ -33,10 +33,29 @@ /* callbacks provided by xc_domain_save */ struct save_callbacks { + /* Called after expiration of checkpoint interval, + * to suspend the guest. + */ int (*suspend)(void* data); - /* callback to rendezvous with external checkpoint functions */ + + /* Called after the guest's dirty pages have been + * copied into an output buffer. + * Callback function resumes the guest & the device model, + * returns to xc_domain_save. + * xc_domain_save then flushes the output buffer, while the + * guest continues to run. + */ int (*postcopy)(void* data); - /* returns: + + /* Called after the memory checkpoint has been flushed + * out into the network. Typical actions performed in this + * callback include: + * (a) send the saved device model state (for HVM guests), + * (b) wait for checkpoint ack + * (c) release the network output buffer pertaining to the acked checkpoint. + * (c) sleep for the checkpoint interval. + * + * returns: * 0: terminate checkpointing gracefully * 1: take another checkpoint */ int (*checkpoint)(void* data); |