From nobody Mon May 6 09:42:43 2024 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 1624639080640440.76666883780524; Fri, 25 Jun 2021 09:38:00 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.147325.271487 (Exim 4.92) (envelope-from ) id 1lwopw-0006GF-JQ; Fri, 25 Jun 2021 16:37:48 +0000 Received: by outflank-mailman (output) from mailman id 147325.271487; Fri, 25 Jun 2021 16:37:48 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lwopw-0006G6-GB; Fri, 25 Jun 2021 16:37:48 +0000 Received: by outflank-mailman (input) for mailman id 147325; Fri, 25 Jun 2021 16:37:47 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1lwopv-0006FN-1k for xen-devel@lists.xenproject.org; Fri, 25 Jun 2021 16:37:47 +0000 Received: from foss.arm.com (unknown [217.140.110.172]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 559867d7-eded-4ff4-b049-5ac0980b89b7; Fri, 25 Jun 2021 16:37:46 +0000 (UTC) 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 29ED91396; Fri, 25 Jun 2021 09:37:46 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 433703F719; Fri, 25 Jun 2021 09:37:45 -0700 (PDT) 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: 559867d7-eded-4ff4-b049-5ac0980b89b7 From: Rahul Singh To: xen-devel@lists.xenproject.org Cc: bertrand.marquis@arm.com, rahul.singh@arm.com, Stefano Stabellini , Julien Grall , Volodymyr Babchuk Subject: [PATCH] xen/arm: smmuv1: Set privileged attr to 'default' Date: Fri, 25 Jun 2021 17:37:27 +0100 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: <612e7f61c19e60019bb7829888342fda95fd36be.1624546532.git.rahul.singh@arm.com> References: <612e7f61c19e60019bb7829888342fda95fd36be.1624546532.git.rahul.singh@arm.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Backport commit e19898077cfb642fe151ba22981e795c74d9e114 "iommu/arm-smmu: Set privileged attribute to 'default' instead of 'unprivileged'" Original commit message: Currently the driver sets all the device transactions privileges to UNPRIVILEGED, but there are cases where the iommu masters wants to isolate privileged supervisor and unprivileged user. So don't override the privileged setting to unprivileged, instead set it to default as incoming and let it be controlled by the pagetable settings. Acked-by: Will Deacon Signed-off-by: Sricharan R Signed-off-by: Will Deacon Signed-off-by: Rahul Singh Acked-by: Stefano Stabellini Tested-by: Stefano Stabellini --- xen/drivers/passthrough/arm/smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/arm/smmu.c b/xen/drivers/passthrough/a= rm/smmu.c index 1a68c2ab3b..d9a3a0cbf6 100644 --- a/xen/drivers/passthrough/arm/smmu.c +++ b/xen/drivers/passthrough/arm/smmu.c @@ -1566,7 +1566,7 @@ static int arm_smmu_domain_add_master(struct arm_smmu= _domain *smmu_domain, continue; =20 s2cr[idx].type =3D type ; - s2cr[idx].privcfg =3D S2CR_PRIVCFG_UNPRIV; + s2cr[idx].privcfg =3D S2CR_PRIVCFG_DEFAULT; s2cr[idx].cbndx =3D cbndx; arm_smmu_write_s2cr(smmu, idx); } --=20 2.17.1