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

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



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

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