From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v3] xl: fix vcpus to vnode assignement in config file Date: Wed, 22 Jul 2015 15:55:35 +0100 Message-ID: <1437576935.19412.10.camel@citrix.com> References: <20150721173156.28189.35543.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZHvQr-0005Lq-Ml for xen-devel@lists.xenproject.org; Wed, 22 Jul 2015 14:55:41 +0000 In-Reply-To: <20150721173156.28189.35543.stgit@Solace.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli , xen-devel@lists.xenproject.org Cc: Ian Jackson , Wei Liu List-Id: xen-devel@lists.xenproject.org On Tue, 2015-07-21 at 19:31 +0200, Dario Faggioli wrote: > In fact, right now, the following (legitimate) > configuration: > > vcpus = '4' > vnuma = [ [ "pnode=0","size=512","vcpus=0,1","vdistances=10,20" ], > [ "pnode=1","size=512","vcpus=2,3","vdistances=20,10" ] ] > > Produces the following error: > > # xl create /etc/xen/test.cfg > Parsing config from /etc/xen/test.cfg > xl: maxvcpus < vcpu > > That is because, we only process the first element of the > "vcpus=" list (of each vnode specification). Therefore, > in the above case, we only see 2 vcpus, out of 4, being > assigned to the vnodes, and hence the error. > > What we need is either a multidimentional array, or a > bitmap, to temporary store the vcpus of a vnode, while > parsing the vnuma config entry. Let's use the latter, > which happens to also make it easier to copy the outcome > of the parsing to its final destination in b_info, if > everything goes ok. > > Signed-off-by: Dario Faggioli > Acked-by: Wei Liu Applied, thanks.