# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1168891374 28800
# Node ID 477813c50e5db59ae08d346288edf19eaf19dbcb
# Parent 204aa85417bd0c618cfe6dd69088a9a443191196
Make suspend return 1 when a domain is resumed.
Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
diff -r 204aa85417bd -r 477813c50e5d tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c Mon Jan 15 12:01:27 2007 -0800
+++ b/tools/libxc/xc_linux_save.c Mon Jan 15 12:02:54 2007 -0800
@@ -569,7 +569,18 @@ static xen_pfn_t *xc_map_m2p(int xc_hand
return m2p;
}
-
+static int xc_set_vcpucontext(int xc_handle, uint32_t dom,
+ vcpu_guest_context_t *ctxt)
+{
+ DECLARE_DOMCTL;
+
+ domctl.cmd = XEN_DOMCTL_setvcpucontext;
+ domctl.domain = (domid_t)dom;
+ domctl.u.vcpucontext.vcpu = 0;
+ set_xen_guest_handle(domctl.u.vcpucontext.ctxt, ctxt);
+
+ return xc_domctl(xc_handle, &domctl);
+}
int xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
uint32_t max_factor, uint32_t flags, int (*suspend)(int))
@@ -1188,6 +1199,12 @@ int xc_linux_save(int xc_handle, int io_
goto out;
}
+ /* set hypercall return code to indicate domain is resuming */
+ ctxt.user_regs.eax = 1;
+ rc = xc_set_vcpucontext(xc_handle, dom, &ctxt);
+ if (rc)
+ ERROR("Error setting hypercall return code");
+
/* Success! */
rc = 0;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|