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

[xen master] xen/arm: don't pass iommu properties to hwdom for iommu-map



commit a236b74b961faa045640275605e319bba45483c1
Author:     Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
AuthorDate: Thu Nov 9 13:27:04 2023 -0500
Commit:     Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Wed Dec 13 10:40:00 2023 +0000

    xen/arm: don't pass iommu properties to hwdom for iommu-map
    
    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@xxxxxxx>
    Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
    Acked-by: Julien Grall <jgrall@xxxxxxxxxx>
---
 xen/arch/arm/domain_build.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 613b2885ce..6945b9755d 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -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;
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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