From: Brendan Cully Subject: Re: [PATCH 3 of 7] Make suspend return 1 when a domain is resumed Date: Fri, 19 Jan 2007 16:04:00 -0800 Message-ID: <20070120000400.GB3732@ventoux.cs.ubc.ca> References: <477813c50e5db59ae08d.1168891513@ventoux.cs.ubc.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="VS++wcV0S1rZb1Fb" Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Friday, 19 January 2007 at 15:32, Keir Fraser wrote: > On 15/1/07 19:05, "Brendan Cully" wrote: > > > Make suspend return 1 when a domain is resumed. > > > > Signed-off-by: Brendan Cully > > We'll do this the other way round (0 on resume; 1 on > checkpoint/suspend-cancel) for backwards compat. > > xc_set_vcpucontext() is a nice thing to have, but it belongs in xc_domain.c > and it would be great if all direct users of the domctl could be ported to > use it. I'd gladly take that patch. :-) What's even nicer is it's already been done. Here's a refresh of this patch; I'll send along a cleanup for the other callers separately. --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xc-save-suspend-rc.patch" # HG changeset patch # User Brendan Cully # Date 1169250376 28800 # Node ID fbe5ab1ecd2131818922929852fe50ec75dfc88b # Parent f89126a590738ad804463772230dde0b4a6640ba Make suspend return 1 from suspend-cancel. Signed-off-by: Brendan Cully diff -r f89126a59073 -r fbe5ab1ecd21 tools/libxc/xc_linux_save.c --- a/tools/libxc/xc_linux_save.c Fri Jan 19 16:11:31 2007 +0000 +++ b/tools/libxc/xc_linux_save.c Fri Jan 19 15:46:16 2007 -0800 @@ -1181,6 +1181,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_vcpu_setcontext(xc_handle, dom, 0, &ctxt); + if (rc) + ERROR("Error setting hypercall return code"); + /* Success! */ rc = 0; --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --VS++wcV0S1rZb1Fb--