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

Re: [Xen-devel] [PATCH v2 08/21] xen/arm: Initialize the virtual GIC later



On Fri, 2014-08-29 at 16:04 -0400, Julien Grall wrote:
> 
> On 29/08/14 15:49, Andrii Tseglytskyi wrote:
> > On Fri, Aug 29, 2014 at 9:57 PM, Julien Grall <julien.grall@xxxxxxxxxx> 
> > wrote:
> >> You will have to modify the function for your purpose. If you plan to PIRQ
> >> == VIRQ every time, you could do smth like:
> >>
> >>
> >> d->arch.vgic.nr_spis = gic_number_lines() - 32;
> >>
> >> I assume, you already modified vgic_allocate_irq to return directly the
> >> pirq, and do nothing in vgic_free_irq.
> >
> > Yes, locally I did the same as you mentioned, but I'm thinking about
> > solution which will allow me to have 1 to 1 irq mapping and which will
> > be acceptable for Xen mainline.
> 
> IHMO, the best solution would adding a boolean in the new DOMCTL to 
> specify if we want to use PIRQ == VIRQ or not.

Shouldn't it be up to the toolstack to pass in a suitably large nr_spis,
i.e. at least as large as the maximum irq it wasn't to map 1:1?

So with Andrii's set of 53, 173, 174 the toolstack would have to pass
174.

Ian.

> Then you will have to modify vgic_allocate_irq to return the physical 
> IRQ if the domain as this new option enabled.
> 
> > My local diff is:
> >
> > diff --git a/xen/arch/arm/physdev.c b/xen/arch/arm/physdev.c
> > index 9333aa0..50ff100 100644
> > --- a/xen/arch/arm/physdev.c
> > +++ b/xen/arch/arm/physdev.c
> > @@ -46,16 +46,13 @@ static int physdev_map_pirq(domid_t domid, int
> > type, int index, int *pirq_p)
> >
> >       virq = vgic_allocate_virq(d, irq);
> >       ret = -EMFILE;
> >       if ( virq == -1 )
> >           goto free_domain;
> >
> > -    ret = route_irq_to_guest(d, virq, irq, "routed IRQ");
> > +    ret = route_irq_to_guest(d, irq, irq, "routed IRQ");
> 
> With this change you may have some issue when unmap_pirq is used. I 
> would modify vgic_allocate_irq to always return the physical IRQ number.
> 
> The code will be also more clean.
> 



_______________________________________________
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®.