[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] shut down domain when last vCPU goes down
On 16/02/18 15:10, Jan Beulich wrote: > --- a/xen/common/domain.c > +++ b/xen/common/domain.c > @@ -1321,6 +1321,22 @@ long do_vcpu_op(int cmd, unsigned int vc > break; > > case VCPUOP_down: > + for_each_vcpu ( d, v ) > + if ( v->vcpu_id != vcpuid && !test_bit(_VPF_down, > &v->pause_flags) ) > + { > + rc = 1; > + break; > + } > + > + if ( !rc ) How about: if ( !rc ) /* Last vcpu going down? */ just to give some hint of what is going on to a casual reader? Preferably with this is or something similar, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > + { > + domain_shutdown(d, SHUTDOWN_poweroff); > + break; > + } > + > + rc = 0; > + v = d->vcpu[vcpuid]; > + > #ifdef CONFIG_X86 > if ( pv_shim ) > rc = continue_hypercall_on_cpu(0, pv_shim_cpu_down, v); > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |