From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 5/6] xen: arm: map child MMIO and IRQs to dom0 for PCI bus DT nodes. Date: Fri, 26 Jun 2015 19:56:33 +0200 Message-ID: <558D9251.2070703@citrix.com> References: <1431084401.2660.440.camel@citrix.com> <1431084420-14372-5-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1431084420-14372-5-git-send-email-ian.campbell@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , xen-devel@lists.xen.org Cc: julien.grall@linaro.org, tim@xen.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org Hi Ian, NIT in the title: The final point is not necessary On 08/05/2015 13:26, Ian Campbell wrote: > +static int map_device_children(struct domain *d, > + const struct dt_device_node *dev) > +{ > + bool_t need_mapping = !dt_device_for_passthrough(dev); > + int ret; > + > + if ( dt_device_type_is_equal(dev, "pci") ) > + { > + DPRINT("Mapping children of %s to guest\n", dt_node_full_name(dev)); > + > + /* > + * We need to handle IRQs even if !need_mapping in order to > + * setup the domain's permissions on the device's IRQs, such > + * that it can pass them through to other domains. > + */ > + ret = dt_for_each_irq_map(dev, &map_interrupt_to_domain, d); > + if ( ret < 0 ) > + return ret; > + > + if ( need_mapping ) > + { I forgot to mention in the previous version that we need to give iomem permission to the guest. Otherwise DOM0 won't be able to map the BAR into the guest. Regards, -- Julien Grall