[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/3] x86_64: allow more vCPU-s per guest
>>> Keir Fraser <keir.fraser@xxxxxxxxxxxxx> 18.06.09 11:39 >>> > Then I think it would be better to make that domctl really singleshot (i.e., > fail if d->max_vcpus is already non-zero), with a comment explaining why it > is implemented this way. Buggily implementing an unused case can't be good. > Can you generate a patch for this, please? Here we go: Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx> --- 2009-06-10.orig/xen/common/domctl.c 2009-06-10 15:04:45.000000000 +0200 +++ 2009-06-10/xen/common/domctl.c 2009-06-18 13:48:30.000000000 +0200 @@ -463,6 +463,16 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc if ( (max < d->max_vcpus) && (d->vcpu[max] != NULL) ) goto maxvcpu_out; + /* + * For now don't allow increasing the vcpu count from a non-zero + * value: This code and all readers of d->vcpu would otherwise need + * to be converted to use RCU, but at present there's no tools side + * code path that would issue such a request. + */ + ret = -EBUSY; + if ( (d->max_vcpus > 0) && (max > d->max_vcpus) ) + goto maxvcpu_out; + ret = -ENOMEM; if ( max > d->max_vcpus ) { _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |