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

[PATCH v6 1/9] xen/arm: don't pass iommu properties to hwdom for iommu-map


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Thu, 9 Nov 2023 13:27:04 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TljtmAPXpOARb72aidPv0e1JYIofy9OHEYlbfwFC73k=; b=GD/0Z0nZKZwqgXYDJGLkpCm1eCX2AmmU5ig7DWw1HZhfFrdMqvE2LT+AkZsgKFKIxmkM8gMMfArxjXTAcBgPcyrC/kbyeQh09kjf84HLBWDGLqHOrwEYYM7pfcHLMsqzjzZ5OyXn0bNqIiwom1voltw9qwqaL4Yd6qZ+l0dmvPOU1BAsQH0uIM227WKMDDadsuWCJ7TEO81f8njpN7MLiYvODTBolt0ozwUzLVGvhR8LrnepCIbo0IIcXRCdXOzuZE8zUvGr8LflRM2e72i2vlNjU7WyGUvZqlXRhy2sRm9JZiTFuuOSyyXKR29j2D8iZFSZeaTjPqrvgxSwx41u2g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IWMUMYn/YAmcZvdoQVoCE0n+K/etFh87TFf7Y9lVOqyrmHxn3ZjdEt1e30D0OAhesixHS6C3eFZYeaTs22B4SvgsoVTATTmRKBnkwgifqFX6ovRxDJN6L3ui1oS5iK6v79GUSyHwF9awTfP8wgXTjTUGQeF4KmMl3/mlR/54itX0uvWtw6yDkPxDRSjJUtToUFGbT7CEhlzPXKOBjK3n2oAAdKC6h1tCxlnnf4vIl8sDgJ02gA8k+oTcHqmFYJe7hqAoYa5G3hrBV8gw7gYLLpvKYGfTeMnga7I1yiEZ81MRelb4Ok+0hvJ5QoOXqeQ7tpjld90KAteOWDkLhjc8UA==
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>
  • Delivery-date: Thu, 09 Nov 2023 18:28:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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>
---
v5->v6:
* add Julien's A-b

v4->v5:
* new patch
---
 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 49792dd590ee..ca7d0f5ffde5 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -1135,6 +1135,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;
 
-- 
2.42.0




 


Rackspace

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