From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ryan Harper Subject: Re: [PATCH] 0/2 VCPU creation and allocation Date: Mon, 10 Oct 2005 11:05:38 -0500 Message-ID: <20051010160538.GO17358@us.ibm.com> References: <20051010151651.GK17358@us.ibm.com> <20051010152821.GN17358@us.ibm.com> <3f428c67eaeb9dd543c246e55a156fd3@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <3f428c67eaeb9dd543c246e55a156fd3@cl.cam.ac.uk> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org * Keir Fraser [2005-10-10 10:56]: > > On 10 Oct 2005, at 16:28, Ryan Harper wrote: > > >>Either we should take set_max_vcpus, and have that implicitly do the > >>work of VCPUOP_create, or we should take VCPUOP_create (callable only > >>by domain0) and have that implicitly increase max_vcpus for the > >>subject > >>domain. > > > >OK. I'll re-work VCPUOP_create to be callable only by dom0 and > >auto-increment max_vcpus. > > Do you even need a max_vcpus variable? Surely the appropriate check is > implicit in VCPUOP_initialise detecting whether or not the relevant > VCPU has been created? I was going to ensure ordered VCPU creation. Without something like vcpuid < max_vcpus+1, and increment on successful creation, one can create vcpus in any order, 1,5,7, 10. I don't think it *should* matter but I've not looked elsewhere through the code to see if there are any other areas assuming all struct vcpu* being valid between 0 and n in the d->vcpus[] array. -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 ryanh@us.ibm.com