From: Ian Campbell Subject: Re: [PATCH] libxl: Make 'xl vcpu-set' work properly on overcommited hosts. Date: Wed, 8 May 2013 11:46:39 +0100 Message-ID: <1368009999.26321.223.camel@zakaz.uk.xensource.com> References: <1367959244-5413-1-git-send-email-konrad.wilk@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap Cc: "xen-devel@lists.xensource.com" , Ian Jackson , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Wed, 2013-05-08 at 11:32 +0100, George Dunlap wrote: > On Tue, May 7, 2013 at 9:40 PM, Konrad Rzeszutek Wilk > wrote: > > The libxl_cpu_bitmap_alloc(..) function, if provided with a zero > > value for max CPUs will call xc_get_max_cpus() which will retrieve > > the number of physical CPUs the host has. This is usually > > OK if the guest's maxvcpus <= host pcpus. But if the value > > is different, then the bitmap for VCPUs is limited by the > > number of CPUs the host has. > > > > This is incorrect as what we want is to hotplug in the guest > > the amount of CPUs that the user specified on the command line > > and not be limited by the amount of physical CPUs. > > > > Signed-off-by: Konrad Rzeszutek Wilk > > Given the cost/benefits of this, I'm inclined to say this should wait > until the 4.4 window opens. Having more guest vcpus than host pcpus > is not an urgent need, and there is a chance (however small) of this > exposing some other kind of bug. Not disputing this. I imagine the desire is to add vcpus to a guest after migrating to a larger host. If so then this should be in the commit log because you are right that as the commit message currently stands the immediate response is "why on earth..." My only other concern would be that the existing code has a buffer overrun under these circumstances. I've not checked this either. Ian.