[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v1 03/10] xen/arm: move vgic data to vgic driver



On Thu, 20 Mar 2014, Julien Grall wrote:
> On 03/20/2014 05:14 PM, Stefano Stabellini wrote:
> > On Wed, 19 Mar 2014, vijay.kilari@xxxxxxxxx wrote:
> >> @@ -142,7 +133,7 @@ struct arch_domain
> >>          spinlock_t lock;
> >>          int ctlr;
> >>          int nr_lines; /* Number of SPIs */
> >> -        struct vgic_irq_rank *shared_irqs;
> >> +        void *shared_irqs;
> > 
> > I would prefer to avoid void* fields. Either we introduce a
> > vgic_irq_rank union that can be v2 or v3, or we could have a single
> > opaque void* pointer that each vgic implementation can use for whatever
> > they like. I think that the union is probably better because it would
> > let us avoid quite a few casts in the code.
> > 
> 
> Most of the cast can be removed without this trick :).
> 
> IHMO, void * might better to avoid expanding the domain/VCPU structure.
> We are already close to the 1 page size.

A pointer is fine, that is not an issue.
However we should try to avoid the usage of void* as a way to avoid type
checking at compile time.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.