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] 0/2 VCPU creation and allocation

* Keir Fraser <Keir.Fraser@xxxxxxxxxxxx> [2005-10-10 11:13]:
> 
> On 10 Oct 2005, at 17:05, Ryan Harper wrote:
> 
> >>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.
> 
> Then the vcpu parameter to VCPUOP_create is redundant -- there's only 
> one value you will be prepared to accept! If we don't want the 
> flexibility of a sparse vcpu map (and I think we don't) then perhaps we 
> are better off without VCPUOP_create (which is maybe even a bit neater, 
> leaving vcpu_op as a completely unpriv local hypercall) and stick with 
> the set_max_vcpus dom0_op? And have that implicitly create the vcpu 
> struct for vcpus 0...n-1?

OK, that makes sense.  I'll turn VCPUOP_create into set_max_vcpus(max)
which will create vcpus 1-(max-1).  Any preference on the hypercall
name?  Does set_max_vcpus() still make sense if it is also creating
vcpus?

How about DOM0_CREATEVCPUS and
    do_createvcpus(struct domain* d, unsigned int max_vcpus).

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx

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