Message ID | a1a1b0116653fba579d1014aeb5a5fb56fb37313.1728491532.git.nicolinc@nvidia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9BF38CEE336 for <linux-arm-kernel@archiver.kernel.org>; Wed, 9 Oct 2024 17:28:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:CC:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=B+qA0TvXiEAf71akvo2Q6CNGY6zTvvtj1HugivbJ7RM=; b=jBjp9H01nw4wneDd9qe5OtbLsE lxnG39g/FdNVEtrepXtVnAL/txAbeIkostwpeAHuwxeTbrBFIX3jxT4n00MpAep0mFO7w3SsuGYSB iRXf1esM9mVXzgOGZSbk5WQW1VDKDkSG+g46lFFfUDPfNdKtSOrfjVc0oa2F1B6UOdTULVU/tZUdw ByeI4eImTjPrSVGx24xSnjO4CaUTpqBNvG5+GG80Mv8cXRDELbsezr7IP5KQEAVRr+bB+6h9+eG15 5tpxFyxGOfeiHVI0wlNNfI5cJwjkgmy+tVFqGca3dhfH3ZQ3VXTcv18YReSGX3b3sKk1NmQ7sh7Eq 0e4i6+wg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1syaUT-0000000AAmr-1vdb; Wed, 09 Oct 2024 17:28:49 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syZiw-0000000A0oI-0zHI for linux-arm-kernel@bombadil.infradead.org; Wed, 09 Oct 2024 16:39:42 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=B+qA0TvXiEAf71akvo2Q6CNGY6zTvvtj1HugivbJ7RM=; b=RmIya6ApLnLluCo9chwufERBRw D129o0Cp5955ZA80n5kuzK/+1JJeerpjrJeioQTvXRK2V7YJopl1pbz6+rurWghA06FSAwZihDElR P/mdlUq4cVpDNmBdwjfFmzmRgsVcbqE0xqqmMxqN88FTssU66uazsPcYDzqBxj4rBHNrokaRVkRSX J+6jXRPbFajvI4YRFys4sWG6xR55eM4p4Fen5fNBb9hH49qLfFPuzvds+tkeNDf+RljdBdEPqgdd9 7W75C/ZQKaRrxsUJOkwqvvBW8ARuZcV9NR17/KG2W3R3jZnUBnHy2oarY5LYWWbaEKvZ6jW41wVYK EGmD2UnQ==; Received: from mail-dm6nam11on2061c.outbound.protection.outlook.com ([2a01:111:f403:2415::61c] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1syZit-000000052k8-0Z8w for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2024 16:39:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZWmg2brFGXCt6vN0Ikn+Y4xNhOUhxAgRmsgMCcQZm2sFDaXr9j9elCXxcSEO33iM1iFgjlW0O04ZQk9UwDmGXCMGW721W+rLf0LxWBolMhDZszao6Tj3A8XZbsxvJ7l4s1VZMZ9xwr8d8yOCibF3DQ0tG27oJhI7zPevQPMkKEWyQRA8yyU5xTH7hv6aThPV/RmhmMS/t8C6vhiiDy0YV0R6Q2lBEYsSt0yfPL13EAjG1ijfxy0tnFN9n/8dbAFntum0uc0L26MG16WirBr76FcftxJfE5CP+OPqAkgMZhp9HsdeONBvHNjXIfwdbHiMnjzNAv8HcS92DL6HLBDlqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=B+qA0TvXiEAf71akvo2Q6CNGY6zTvvtj1HugivbJ7RM=; b=iBwM3Aw6JCSlZBdPUNX3GhSGuVmcCen5M4affLvK5ysAbzJyyXWy2J2ok5QQc1KkqNqN6bnmCrCF/TD3V9S32FfBqRrAQ1eYs/RLH/ZwYBbzNNSI3Du1rVkPo4ykN2+Aigi0WWrxVmAnh+toUAJBx/9H5skrEQ4TQDf9vd/S5YbiQeynq4b1YAeAApuV7LSvwyVTtZIiwoamIZnHBpZKVNrlWzuTYSa34+lOE4Ka5S02hjClwrfaZ/s/9gR+soDK3rBA0QvhFxezWhNLXLKABB0wFbmhOcy3dhUOowULJ8YwvzezYne15JCTjRFcJSH1MCjw3OSBHCFsmNGLrIHvbA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=B+qA0TvXiEAf71akvo2Q6CNGY6zTvvtj1HugivbJ7RM=; b=icI4F0stppVz2SeREutZiKSgxEIaUSekgrQvhI6vPLCIlRsndYoupmYfsfcLRNo/ElghTcdlcfgsX4av5QMP5FL11aCi6jYGTD6Vm+aDh5ZDzJqVOTaf1Px/AcP0zcV2sMAZO/Ml4nLQI+EDxU2P57Gdn9Y9txkpKcfVtmo1rtfy9wbZDhtEJ6kMYwL4c+YI8xBpgfO3kCYfYMX66urooIZWuhmI3ciRBj8GqfZEk+XqZL0fSM/NMLGtXP2CBcPmLgG69BmcxE8ZXQAxSEJWQLUS5eohSCqHDsOmu1278/aKLdiDtrZ9rYps3v6rX7xgF/v1rf4hfgoFthxTv+oONA== Received: from SA1P222CA0110.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c5::22) by DS0PR12MB6390.namprd12.prod.outlook.com (2603:10b6:8:ce::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.16; Wed, 9 Oct 2024 16:39:28 +0000 Received: from SA2PEPF00003F63.namprd04.prod.outlook.com (2603:10b6:806:3c5:cafe::5) by SA1P222CA0110.outlook.office365.com (2603:10b6:806:3c5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.17 via Frontend Transport; Wed, 9 Oct 2024 16:39:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by SA2PEPF00003F63.mail.protection.outlook.com (10.167.248.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8048.13 via Frontend Transport; Wed, 9 Oct 2024 16:39:28 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 9 Oct 2024 09:39:18 -0700 Received: from drhqmail202.nvidia.com (10.126.190.181) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Wed, 9 Oct 2024 09:39:17 -0700 Received: from Asurada-Nvidia.nvidia.com (10.127.8.12) by mail.nvidia.com (10.126.190.181) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Wed, 9 Oct 2024 09:39:16 -0700 From: Nicolin Chen <nicolinc@nvidia.com> To: <jgg@nvidia.com>, <kevin.tian@intel.com>, <will@kernel.org> CC: <joro@8bytes.org>, <suravee.suthikulpanit@amd.com>, <robin.murphy@arm.com>, <dwmw2@infradead.org>, <baolu.lu@linux.intel.com>, <shuah@kernel.org>, <linux-kernel@vger.kernel.org>, <iommu@lists.linux.dev>, <linux-arm-kernel@lists.infradead.org>, <linux-kselftest@vger.kernel.org>, <eric.auger@redhat.com>, <jean-philippe@linaro.org>, <mdf@kernel.org>, <mshavit@google.com>, <shameerali.kolothum.thodi@huawei.com>, <smostafa@google.com>, <yi.l.liu@intel.com>, <aik@amd.com>, <patches@lists.linux.dev> Subject: [PATCH v3 16/16] iommu/arm-smmu-v3: Update comments about ATS and bypass Date: Wed, 9 Oct 2024 09:38:28 -0700 Message-ID: <a1a1b0116653fba579d1014aeb5a5fb56fb37313.1728491532.git.nicolinc@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <cover.1728491532.git.nicolinc@nvidia.com> References: <cover.1728491532.git.nicolinc@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00003F63:EE_|DS0PR12MB6390:EE_ X-MS-Office365-Filtering-Correlation-Id: a1d9fedd-59e9-4d15-ea16-08dce880f1b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700013|7416014|376014; X-Microsoft-Antispam-Message-Info: lcOCo9ImSp4HoRXegM+zQ769ZLy8cJEoQ6uZONhprDKXJlTop9mz1h9VNQfMoy2VWShcS//GUs7S4RoHPaYl+rXmJb2yEFUf7W6zgfJ2dA4WngDMYwOEuN5gvUVz8Ugmi/vxnkx6g70l+JIThEx831dK/f41v962HccPHlmSpyVE3Bpcd3cX/3cShS8LRC54RC1syEnfuZlK06RdHVtTWkEk7sTUe3/2+ip+JndEN493V65JC0WKZSCyd2x1oXL3AeIQtPK4iwPXjCfI6qUQvR6HUvPKD7gc3lPcsyBxAW7tDznzQa4oP1zEU1YDTTvo2VcRyMi2Xfco7QjdC4BSlooDbHVybQGwGc2HvztvhxHmeuCoPb9ldcuSo5Zkjg0r2H/QK9JflFFNSzDYTiGHx/uw4liofEX6meO2vGLNmKT7sp487BNUtI6N3TbI1kB9J8SrM7tecmgNpZyyZfVTfS7geqQOfSeYmMNQT0SYjqxqGHoJB7/W5ZEo0x+K2ivG2TynD5eXp4pV0gv3tc3wlgSkkXI0Uq/+cVRQ1R5iqb1BpsVOz7a51w2PIgZVmWB6u2q2t9OJ1pFL4uGIPu4sghcRlk3VDLLRGJ1tnCyT/HoNzrBWnoHUE6o5DjfQHu1lAfVyy+oyBquS9rppWVeh2WHmAxOjW82ApaEXEcPjHjWh7c/SsU21erLB5OLwk/HsKsDmxVMPEUYV5SAcUJmXk9BV328IOyBBUnpuXjrTE5qCmLVCkekSvuDEARe6P8GAtOnk9XHU+KHBU1kAzzGB5Dw1DW9HNccH8K9yzejQM2vU7ekWQjPwrgxpZblVDgWUDOz+NJlLOHhQ5bL4kvW5c5rwmKR1fpcp9C2xUQ2UzSXkg+t71gmSRyo9g/b+35ILIinTGtBCMZVUoaNDBC7715nYiCGKC7NKfmhDz1VHwDYB75GU94kD22h2akBy6MNmjnb7VwX7wNl/qfUtmitnQq1Le2Oweg/9da8TkD3IX484jnCL1rxNqbfOLBKGUIIcpmc8CwwuZ/iIEG8XIsKsxEWzt3R4gm5QGIPo0MCrEgKn2GaHpvx0R6dvaCKTMQbIHp+GtZJqLbb0jqZqnEEh6Wz5TXoVrXrwY/Iq+5fjsnMORCyJg/RKzgOd8aft0f2WNl66yqABU6tuSfcEsRL6MpIxWh8boOyvomUusS6AEkyGk2tlAzYrs6l9xZC4l7e2RGyaMTPtGWFs1QEfdUbW5kU+uRtqIb90eb4zMLsyFigFDcaLiHf2pcuSTWmsSgtIHXPYb1Le5DJmwtwk3cCkH/tskWHeHtQ8TI3/yMHV6OWE37EgAge00SaJJqViAUbR5LeaSS0vIZv6vO97qAPZmY/vQfJNCqZF+K/st45seTYAMyk7z8FmexQ1Vb+gaeo2 X-Forefront-Antispam-Report: CIP:216.228.118.232;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc7edge1.nvidia.com;CAT:NONE;SFS:(13230040)(1800799024)(82310400026)(36860700013)(7416014)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Oct 2024 16:39:28.7494 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1d9fedd-59e9-4d15-ea16-08dce880f1b7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00003F63.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6390 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241009_173939_339594_BD0C0477 X-CRM114-Status: GOOD ( 18.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
[v3,01/16] iommufd/viommu: Introduce IOMMUFD_OBJ_VDEVICE and its related struct
|
expand
|
diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c index 1cb4afe7a90a..236f930f9a97 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -2745,9 +2745,14 @@ int arm_smmu_attach_prepare(struct arm_smmu_attach_state *state, * Translation Requests and Translated transactions are denied * as though ATS is disabled for the stream (STE.EATS == 0b00), * causing F_BAD_ATS_TREQ and F_TRANSL_FORBIDDEN events - * (IHI0070Ea 5.2 Stream Table Entry). Thus ATS can only be - * enabled if we have arm_smmu_domain, those always have page - * tables. + * (IHI0070Ea 5.2 Stream Table Entry). + * + * However, if we have installed a CD table and are using S1DSS + * then ATS will work in S1DSS bypass. See "13.6.4 Full ATS + * skipping stage 1". + * + * Disable ATS if we are going to create a normal 0b100 bypass + * STE. */ state->ats_enabled = !state->disable_ats && arm_smmu_ats_supported(master); @@ -3072,8 +3077,10 @@ static void arm_smmu_attach_dev_ste(struct iommu_domain *domain, if (arm_smmu_ssids_in_use(&master->cd_table)) { /* * If a CD table has to be present then we need to run with ATS - * on even though the RID will fail ATS queries with UR. This is - * because we have no idea what the PASID's need. + * on because we have to assume a PASID is using ATS. For + * IDENTITY this will setup things so that S1DSS=bypass which + * follows the explanation in "13.6.4 Full ATS skipping stage 1" + * and allows for ATS on the RID to work. */ state.cd_needs_ats = true; arm_smmu_attach_prepare(&state, domain);