From nobody Mon Feb 9 04:08:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 166991153099885.42954993401793; Thu, 1 Dec 2022 08:18:50 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.451029.708616 (Exim 4.92) (envelope-from ) id 1p0mGd-0003l1-FQ; Thu, 01 Dec 2022 16:18:31 +0000 Received: by outflank-mailman (output) from mailman id 451029.708616; Thu, 01 Dec 2022 16:18:31 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p0mGd-0003ku-CD; Thu, 01 Dec 2022 16:18:31 +0000 Received: by outflank-mailman (input) for mailman id 451029; Thu, 01 Dec 2022 16:18:30 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1p0mGc-0002as-1T for xen-devel@lists.xenproject.org; Thu, 01 Dec 2022 16:18:30 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-sth1.inumbo.com (Halon) with ESMTP id ca708677-7193-11ed-91b6-6bf2151ebd3b; Thu, 01 Dec 2022 17:18:29 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3BA32D6E; Thu, 1 Dec 2022 08:18:35 -0800 (PST) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CD0FE3F73B; Thu, 1 Dec 2022 08:18:27 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ca708677-7193-11ed-91b6-6bf2151ebd3b From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: Stefano Stabellini , Julien Grall , Bertrand Marquis , Volodymyr Babchuk Subject: [RFC PATCH 18/21] xen/arm: iommu: skip the iommu-map property for PCI devices Date: Thu, 1 Dec 2022 16:02:42 +0000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1669911532105100001 Content-Type: text/plain; charset="utf-8" Current code skip the IOMMUS specific properties for the non PCI devices when handling the dom0 node but there is no support to skip the IOMMUS specific properties for the PCI devices. This patch will add the support to skip the IOMMUS specific properties for the PCI devices. Signed-off-by: Rahul Singh --- xen/arch/arm/domain_build.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 8e85fb7854..7cd99a6771 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -1112,9 +1112,18 @@ static int __init write_properties(struct domain *d,= struct kernel_info *kinfo, * Use "iommu_node" as an indicator of the master device which propert= ies * should be skipped. */ - iommu_node =3D dt_parse_phandle(node, "iommus", 0); - if ( iommu_node && device_get_class(iommu_node) !=3D DEVICE_IOMMU ) - iommu_node =3D NULL; + if ( dt_device_type_is_equal(node, "pci") ) + { + iommu_node =3D dt_parse_phandle(node, "iommu-map", 1); + if ( iommu_node && device_get_class(iommu_node) !=3D DEVICE_IOMMU ) + iommu_node =3D NULL; + } + else + { + iommu_node =3D dt_parse_phandle(node, "iommus", 0); + if ( iommu_node && device_get_class(iommu_node) !=3D DEVICE_IOMMU ) + iommu_node =3D NULL; + } =20 dt_for_each_property_node (node, prop) { --=20 2.25.1