aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xcutils
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-11-09 19:06:25 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-11-09 19:06:25 +0000
commitb6119955dfa6c4bf49f47946810bd49245361609 (patch)
tree431dcd6911972662946bf4c6edf048c63a95b5d3 /tools/xcutils
parent4a6d50ad69a6469bde719b4b6ebe7978775899f9 (diff)
downloadxen-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/xcutils')
-rw-r--r--tools/xcutils/xc_save.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/xcutils/xc_save.c b/tools/xcutils/xc_save.c
index 15d42dacf5..55e4b1d4ef 100644
--- a/tools/xcutils/xc_save.c
+++ b/tools/xcutils/xc_save.c
@@ -71,7 +71,7 @@ static int evtchn_suspend(void)
return 1;
}
-static int suspend(void)
+static int suspend(void* data)
{
unsigned long sx_state = 0;
@@ -166,6 +166,7 @@ main(int argc, char **argv)
{
unsigned int maxit, max_f;
int io_fd, ret, port;
+ struct save_callbacks callbacks;
if (argc != 6)
errx(1, "usage: %s iofd domid maxit maxf flags", argv[0]);
@@ -202,8 +203,10 @@ main(int argc, char **argv)
"using slow path");
}
}
+ memset(&callbacks, 0, sizeof(callbacks));
+ callbacks.suspend = suspend;
ret = xc_domain_save(si.xc_fd, io_fd, si.domid, maxit, max_f, si.flags,
- &suspend, !!(si.flags & XCFLAGS_HVM),
+ &callbacks, !!(si.flags & XCFLAGS_HVM),
&switch_qemu_logdirty);
if (si.suspend_evtchn > 0)