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] support cpupool for xl create

To: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] support cpupool for xl create
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Fri, 07 May 2010 14:57:27 -0700
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 07 May 2010 14:58:35 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4BE3CBCA.7080104@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4BE3CBCA.7080104@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Lightning/1.0b2pre Thunderbird/3.0.4
On 05/07/2010 01:14 AM, Juergen Gross wrote:
> Hi,
>
> attached patch supports cpupool specification for xl create.

This crashes for me:

(gdb) run create /etc/xen/f13pv64 
Starting program: /usr/sbin/xl create /etc/xen/f13pv64
[Thread debugging using libthread_db enabled]
Parsing config file /etc/xen/f13pv64

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79cd805 in libxl_domain_make (ctx=0x60f8a0, info=0x7fffffffe0b0, 
    domid=0x60f890) at libxl.c:172
172         xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), 
info->poolname, strlen(info->poolname));
(gdb) p info->poolname
$2 = 0x0

Adding

diff -r bbf009817ffb tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Fri May 07 19:22:28 2010 +0100
+++ b/tools/libxl/libxl.c       Fri May 07 14:57:00 2010 -0700
@@ -169,7 +169,8 @@
 
     xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/uuid", vm_path), uuid_string, 
strlen(uuid_string));
     xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/name", vm_path), info->name, 
strlen(info->name));
-    xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), 
info->poolname, strlen(info->poolname));
+    if (info->poolname)
+        xs_write(ctx->xsh, t, libxl_sprintf(ctx, "%s/pool_name", vm_path), 
info->poolname, strlen(info->poolname));
 
     libxl_xs_writev(ctx, t, dom_path, info->xsdata);
     libxl_xs_writev(ctx, t, libxl_sprintf(ctx, "%s/platform", dom_path), 
info->platformdata);

fixes it for me.

        J


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