From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brendan Cully Subject: Re: [PATCH 1 of 8] Add resumedomain domctl to resume adomain after checkpoint Date: Thu, 11 Jan 2007 18:02:24 -0800 Message-ID: <20070112020224.GC3738@ventoux.cs.ubc.ca> References: <4514d8e0843ca4e46128.1168565216@ventoux.cs.ubc.ca> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="rwEMma7ioTxnRzrJ" 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: Masaki Kanno Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Friday, 12 January 2007 at 10:38, Masaki Kanno wrote: > Hi Brendan, That was fast! > The 26th is already defined at line 390 in domctl.h. > > #define XEN_DOMCTL_real_mode_area 26 > struct xen_domctl_real_mode_area { > uint32_t log; /* log2 of Real Mode Area size */ > }; Whoops, thanks. That snuck in after I wrote the first patch series, I think. Here's a replacement. --rwEMma7ioTxnRzrJ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="domctl-resumedomain.2.diff" # HG changeset patch # User Brendan Cully # Date 1168566620 28800 # Node ID 74431b023b3cfb12968717d025d48aa27a651e72 # Parent 8fdd24d1dfbfb6134313c83832d9fefa77d6ec3f Add resumedomain domctl to resume a domain after checkpoint. Signed-off-by: Brendan Cully diff -r 8fdd24d1dfbf -r 74431b023b3c xen/common/domctl.c --- a/xen/common/domctl.c Wed Dec 13 15:45:56 2006 -0800 +++ b/xen/common/domctl.c Thu Jan 11 17:50:20 2007 -0800 @@ -250,6 +250,31 @@ ret_t do_domctl(XEN_GUEST_HANDLE(xen_dom } break; + case XEN_DOMCTL_resumedomain: + { + struct domain *d = find_domain_by_id(op->domain); + struct vcpu *v; + + ret = -ESRCH; + if ( d != NULL ) + { + ret = -EINVAL; + printk("Resuming domain %d\n", op->domain); + if ( (d != current->domain) && (d->vcpu[0] != NULL) && + test_bit(_DOMF_shutdown, &d->domain_flags) ) + { + clear_bit(_DOMF_shutdown, &d->domain_flags); + + for_each_vcpu (d, v) + vcpu_wake (v); + + ret = 0; + } + put_domain(d); + } + } + break; + case XEN_DOMCTL_createdomain: { struct domain *d; diff -r 8fdd24d1dfbf -r 74431b023b3c xen/include/public/domctl.h --- a/xen/include/public/domctl.h Wed Dec 13 15:45:56 2006 -0800 +++ b/xen/include/public/domctl.h Thu Jan 11 17:50:20 2007 -0800 @@ -63,6 +63,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_creat #define XEN_DOMCTL_destroydomain 2 #define XEN_DOMCTL_pausedomain 3 #define XEN_DOMCTL_unpausedomain 4 +#define XEN_DOMCTL_resumedomain 27 #define XEN_DOMCTL_getdomaininfo 5 struct xen_domctl_getdomaininfo { --rwEMma7ioTxnRzrJ 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 --rwEMma7ioTxnRzrJ--