]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/arm: don't pass iommu properties to hwdom for iommu-map
authorStewart Hildebrand <stewart.hildebrand@amd.com>
Thu, 9 Nov 2023 18:27:04 +0000 (13:27 -0500)
committerJulien Grall <jgrall@amazon.com>
Wed, 13 Dec 2023 10:40:00 +0000 (10:40 +0000)
A device tree node for a PCIe root controller may have an iommu-map property [1]
with a phandle reference to the SMMU node, but not necessarily an iommus
property. In this case, we want to treat it the same as we currently handle
devices with an iommus property: don't pass the iommu related properties to
hwdom.

[1] https://www.kernel.org/doc/Documentation/devicetree/bindings/pci/pci-iommu.txt

Reported-by: Michal Orzel <michal.orzel@amd.com>
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@amd.com>
Acked-by: Julien Grall <jgrall@amazon.com>
xen/arch/arm/domain_build.c

index 613b2885cebb4aa6b787712ce9bc4ab2890a5167..6945b9755d17f1320cac4833d5e6fe3b58b53bf6 100644 (file)
@@ -550,6 +550,8 @@ static int __init write_properties(struct domain *d, struct kernel_info *kinfo,
      * should be skipped.
      */
     iommu_node = dt_parse_phandle(node, "iommus", 0);
+    if ( !iommu_node )
+        iommu_node = dt_parse_phandle(node, "iommu-map", 1);
     if ( iommu_node && device_get_class(iommu_node) != DEVICE_IOMMU )
         iommu_node = NULL;