From: Ryan Grimm Subject: changing max vcpus threshold while a domain is running Date: Wed, 25 Jan 2006 11:10:09 -0600 Message-ID: <20060125171009.GA8500@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline 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 Frazer Cc: Xen Devel List-Id: xen-devel@lists.xenproject.org Hi Keir, I am interested in changing the max vcpu threshold for a domain while it is running. The following comment in common/dom0_ops.c warns against this: /* * Can only create new VCPUs while the domain is not fully * constructed * (and hence not runnable). Xen needs auditing for races before * removing this check. */ ret = -EINVAL; if ( test_bit(_VCPUF_initialised, &d->vcpu[0]->vcpu_flags) ) goto maxvcpu_out; Do you know which race condition is being avoided by this check for _VCPUF_initialised? Could it be the for_each_vcpu macro only checks for null and a vcpu structure could be alloc'd but not initialized, and then used inside the macro? Thanks, Ryan