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

Re: [Xen-devel] [PATCH v3 4/5] xen: arm: map child MMIO and IRQs to dom0 for PCI bus DT nodes.



On Fri, 2015-05-08 at 11:52 +0100, Julien Grall wrote:
> Hi Ian,
> 
> On 08/05/15 11:42, Ian Campbell wrote:
> > On Wed, 2015-04-29 at 17:22 +0100, Julien Grall wrote:
> >> Hi Ian,
> >>
> >> On 20/04/15 13:16, Ian Campbell wrote:
> >>> +static int map_interrupt_to_domain(const struct dt_device_node *dev,
> >>> +                                   const struct dt_raw_irq *dt_raw_irq,
> >>> +                                   void *data)
> >>> +{
> >>
> >> [..]
> >>
> >>> +    res = route_irq_to_guest(d, dt_irq.irq, dt_irq.irq, 
> >>> dt_node_name(dev));
> >>> +    if ( res < 0 )
> >>> +    {
> >>> +        printk(XENLOG_ERR "Unable to map IRQ%"PRId32" to dom%d\n",
> >>> +               dt_irq.irq, d->domain_id);
> >>> +        return res;
> >>> +    }
> >>
> >> You forgot to give the IRQ permission to the domain.
> > 
> > IOW I should call irq_permit_access, between irq_set_spi_type and
> > route_irq_to_guest I think?
> 
> I can call here. Although it doesn't matter has irq_permit_access is not
> used in route_irq_to_guest.
> 
> > Should I be calling vgic_reserve_virq here as well? Other similar
> > looking code does.
> 
> Yes I forgot to tell you about it.
> 
> > It seems that handle_device() calls vgic_reserve_virq twice with the
> > same arguments (once conditionally, the other not). Is that a rebase-o?
> > Seems to have happened in cb818a58f6f785bb41a35bc1d1e52c66ffbe1e8b.
> 
> Hmmm... yes. I didn't pay enough attention when I rebased this patch, sorry.
> 
> The first call to vgic_reserve_virq should be dropped. It's only
> necessary to reserve the VIRQ when the domain is using the IRQ (i.e
> need_mapping == 1).
> 
> Do you plan to send a patch for it?

Yes, I'll tack it on the front of this series.

Ian.



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