[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v10 06/11] xen: Introduce XEN_DOMCTL_soft_reset
"Jan Beulich" <JBeulich@xxxxxxxx> writes: >>>> On 11.08.15 at 21:57, <konrad.wilk@xxxxxxxxxx> wrote: >> On Tue, Jul 28, 2015 at 03:28:11PM +0200, Vitaly Kuznetsov wrote: >>> @@ -1038,6 +1045,32 @@ void domain_unpause_except_self(struct domain *d) >>> domain_unpause(d); >>> } >>> >>> +int domain_soft_reset(struct domain *d) >>> +{ >>> + struct vcpu *v; >>> + int rc; >>> + >>> + spin_lock(&d->shutdown_lock); >>> + for_each_vcpu ( d, v ) >>> + if ( !v->paused_for_shutdown ) >>> + { >>> + spin_unlock(&d->shutdown_lock); >>> + return -EINVAL; >>> + } >>> + spin_unlock(&d->shutdown_lock); >>> + >>> + rc = evtchn_reset(d); >> >> You do ignore the 'rc' value? In which case why not just >> do: >> >> (void)evtchn_reset(d); >> >> Unless you want to return the 'rc' ? > > It clearly needs to be returned. Yes, as evtchn_reset() doesn't break somewhere in the middle (it can only return -EINVAL is !d->controller_pause_count in this case) I think we're OK with a simple if ( rc ) return rc; here, no domain destroy which we introduce with arch-specific hooks is required (we haven't done anything to the domain yet). Jan, does you Acked-by: stand with such change? -- Vitaly _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |