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

[PATCH v5 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: Wed, 4 Oct 2023 10:55:45 -0400
  • 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
  • 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=r5240fKG5hTdjcdqqDr0qDzDhspiWQ9+ulXYYN4kHfg=; b=YSkVCqJEX4shC03ReXzIwW08wzMzf9jR1LFQAXVse5bZ5th3L9Zdd203eGvxTCHOqPaigBS66YnxHGukb8aifIv76/IUsv1JSKM988UOE/h1elKbW6+0Aw8hxVJH8OhfyI/YyF9lSShxZHO31g9p2hq4aNrX6sJnowkzd/ZvNUOpZq47nhs8tN8rQNKZqffh0EJNwAvZSsaKhcNgow4/TwXYfdOuwHypbtdD9E+OqD7k16eTEsai5zmaCNzjZ+wjxbC4J/Qc7k7axdLfBzTDZIkDV7Nl9CueSI+luKH5Ex7WTCBGsPmF2Av0oPLz//MIlJRK7GyWOFXTzMm+t5Heqg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RcbYzwZHnoD+k53KhGZAdxWRj6gNkyIXmxxvKxZrkj73ns5LPmMmnuRvHTd/zYt5JDS278LBCrU0UdCPw0K9oDG/GjuUalihoyfX8yhNLex3/LkhuMw/K+uvxWsmoKL5I/rR1eP6miokM5c7xW0rPwS7OHBEocZSj5B8/4QClMmUpmk3+L4zF2OYTprI0Dj9/yKfGqDeV+G+BXjQYTvLQOed/7utGSmmhBjKg0iqSycPQQzPDydi3t3xi8+HtvIvKX3nq0AgUiixs/dSmENLKJIC/XGAMRYJ7uM5f7DkhzeHhNts7rRxMSlMmQiLDw2fRJtth1Bxu/mLn1u9WJB6JQ==
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • Delivery-date: Wed, 04 Oct 2023 14:56:47 +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>
---
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 24c9019cc43c..7da254709d17 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®.