[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v8a 1/6] xen/arm: move and rename is_vcpu_running function to sched.h
>>> On 03.07.14 at 14:49, <julien.grall@xxxxxxxxxx> wrote: > On 07/03/2014 09:34 AM, vijay.kilari@xxxxxxxxx wrote: >> @@ -444,7 +428,8 @@ static int vgic_to_sgi(struct vcpu *v, register_t sgir) >> case GICD_SGI_TARGET_OTHERS: >> for ( i = 0; i < d->max_vcpus; i++ ) >> { >> - if ( i != current->vcpu_id && is_vcpu_running(d, i) ) >> + if ( i != current->vcpu_id && d->vcpu != NULL && > > d->vcpu can't be NULL at this point. Otherwise you won't be able to run > VCPU0 of the domain :). > > Although, I may have miss something during the previous version, why > don't you check that the VCPU is NULL in is_vcpu_online? Functions like this generally assume to be called with valid arguments. Eventual future users may have done the validation already, and hence would then be (slightly) penalized by redundant checking. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |