Skip to contentSkip to conversation

changing max vcpus threshold while a domain is running

DISCUSSION Ryan Grimm 1 participant 1 message Jan 25, 2006

lore
Share & tools
lore

Ryan Grimm

author
#0 lore raw

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