WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] Make XEN_DOMCTL_destroydomain hypercall continua

To: Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] Make XEN_DOMCTL_destroydomain hypercall continuable.
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Tue, 28 Aug 2007 18:58:55 +0900
Cc: tgingold@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 28 Aug 2007 02:59:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C2F9AEA5.14F16%keir@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070828085951.GE12712%yamahata@xxxxxxxxxxxxx> <C2F9AEA5.14F16%keir@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
On Tue, Aug 28, 2007 at 10:51:17AM +0100, Keir Fraser wrote:
> On 28/8/07 09:59, "Isaku Yamahata" <yamahata@xxxxxxxxxxxxx> wrote:
> 
> >> do {
> >>   ret = do_domctl(xc_handle, &domctl);
> >> while (ret == EAGAIN);
> > 
> > Right. attached the updated one.
> 
> Hang on! The loop above doesn't do the same as your original one. And looks
> less correct to me. Which is the correct one?

The patch has the following hank which is correct, I believe.
Or am I missing anything else?

diff -r 58d131f1fb35 -r 8e146ea8c43c tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c   Fri Aug 24 16:32:56 2007 +0100
+++ b/tools/libxc/xc_domain.c   Tue Aug 28 17:58:20 2007 +0900
@@ -55,10 +55,14 @@ int xc_domain_destroy(int xc_handle,
 int xc_domain_destroy(int xc_handle,
                       uint32_t domid)
 {
+    int ret;
     DECLARE_DOMCTL;
     domctl.cmd = XEN_DOMCTL_destroydomain;
     domctl.domain = (domid_t)domid;
-    return do_domctl(xc_handle, &domctl);
+    do {
+        ret = do_domctl(xc_handle, &domctl);
+    } while ( ret && errno == EAGAIN );
+    return ret;
 }
 
 int xc_domain_shutdown(int xc_handle,

-- 
yamahata

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel