[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC v2 08/15] Update IRTE according to guest interrupt config changes
> -----Original Message----- > From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > Sent: Friday, June 12, 2015 6:41 PM > To: Wu, Feng > Cc: andrew.cooper3@xxxxxxxxxx; george.dunlap@xxxxxxxxxxxxx; Tian, Kevin; > Zhang, Yang Z; xen-devel@xxxxxxxxxxxxx; keir@xxxxxxx > Subject: RE: [RFC v2 08/15] Update IRTE according to guest interrupt config > changes > > >>> On 12.06.15 at 11:40, <feng.wu@xxxxxxxxx> wrote: > >> From: Jan Beulich [mailto:JBeulich@xxxxxxxx] > >> Sent: Tuesday, June 09, 2015 11:06 PM > >> >>> On 08.05.15 at 11:07, <feng.wu@xxxxxxxxx> wrote: > >> > +static bool_t pi_find_dest_vcpu(struct domain *d, uint8_t dest_id, > >> > + uint8_t dest_mode, uint8_t > >> delivery_mode, > >> > + uint8_t gvec, struct vcpu > >> **dest_vcpu) > >> > +{ > >> > + struct vcpu *v, **dest_vcpu_array; > >> > + unsigned int dest_vcpu_num = 0; > >> > + int ret; > >> > >> This, being given as operand to "return", should match in type with > >> the function's return type. > >> > >> > + dest_vcpu_array = xzalloc_array(struct vcpu *, d->max_vcpus); > >> > >> You realize that this can be quite big an allocation? (You could at > >> least halve it by storing vCPU IDs instead of pointers, but if I'm > >> not mistaken this could even be a simple bitmap.) > > > > If we use vCPU IDs or bitmap, we need to iterate all the vCPUs in the > > domain to find the right vCPU from the vcpu_id, right? > > Why? You can index d->vcpu[]. Oh, yes, I didn't notice that. Thanks, Feng > > Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |