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

Re: [PATCH v1 02/14] xen/pci: solve compilation error on ARM with HAS_PCI enabled

Hi Rahul,

On 20/08/2021 11:30, Rahul Singh wrote:
Please add a comment explaining why this just returns 0.

Here is the comment that I will add in next version.
  * Return 0 as on ARM there is no pci physical irqs that required cleanup.

In this context, PIRQ means an interrupts that was routed to the guest and could be mapped to an event channel. We have no such concept on Arm (see allocate_pirq_struct()).

So I would write "PIRQ event channels are not supported on Arm, so nothing to do".

+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff --git a/xen/drivers/passthrough/arm/iommu.c 
index db3b07a571..fdec1c5547 100644
--- a/xen/drivers/passthrough/arm/iommu.c
+++ b/xen/drivers/passthrough/arm/iommu.c
@@ -135,3 +135,8 @@ void arch_iommu_domain_destroy(struct domain *d)
  void __hwdom_init arch_iommu_hwdom_init(struct domain *d)
+bool arch_iommu_use_permitted(const struct domain *d)
+    return true;

Please add a comment explaining why returning true is always fine.

Here is the comment that I will add in next version:

  * Return true as iommu use is always permitted if mem-sharing,
  * mem-paging, or log-dirty functionality is not enabled.
How about writing "Unlike x86, Arm doesn't support mem-sharing, mem-paging and log-dirty (yet). So there is no restriction to use the IOMMU".

This would make clear why you are mentioning mem-sharing, mem-paging & co.


Julien Grall



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