> -----Original Message----- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Friday, June 12, 2015 6:41 PM > To: Wu, Feng > Cc: andrew.coop...@citrix.com; george.dun...@eu.citrix.com; Tian, Kevin; > Zhang, Yang Z; xen-devel@lists.xen.org; k...@xen.org > Subject: RE: [RFC v2 08/15] Update IRTE according to guest interrupt config > changes > > >>> On 12.06.15 at 11:40, <feng...@intel.com> wrote: > >> From: Jan Beulich [mailto:jbeul...@suse.com] > >> Sent: Tuesday, June 09, 2015 11:06 PM > >> >>> On 08.05.15 at 11:07, <feng...@intel.com> 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@lists.xen.org http://lists.xen.org/xen-devel