From: Vincent Hanquez Subject: Re: [PATCH] libxl/xl: fix multivcpu handling Date: Thu, 3 Jun 2010 17:10:45 +0100 Message-ID: <4C07D405.5080300@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: 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: Stefano Stabellini Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 03/06/10 15:54, Stefano Stabellini wrote: > Hi all, > currently libxl and xl are incapable of handling multivcpus guests > correctly, this patch fixes it. > > > Signed-off-by: Stefano Stabellini > > --- > > > diff -r 4ab68bf4c37e tools/libxl/libxl.c > --- a/tools/libxl/libxl.c Thu Jun 03 07:30:54 2010 +0100 > +++ b/tools/libxl/libxl.c Thu Jun 03 15:51:10 2010 +0100 > @@ -875,6 +875,14 @@ > if (info->apic) { > flexarray_set(dm_args, num++, "-acpi"); > } > + if (info->vcpus) { > + flexarray_set(dm_args, num++, "-vcpus"); > + flexarray_set(dm_args, num++, libxl_sprintf(ctx, "%d", info->vcpus)); > + } should be either if (info->vcpus > 1) or no test at all and info->vcpus == 0 should return with invalid argument. -- Vincent