From patchwork Wed Aug 2 17:26:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 130096 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp680986vqx; Wed, 2 Aug 2023 12:32:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlGCrUyTAUZIEUf3lTbBpIshhRc0KBkyEJiz5Ns0dMvrTdx+pOQ0M791dhXeQzuTsQ+TqTjc X-Received: by 2002:aa7:cf97:0:b0:51e:5322:a642 with SMTP id z23-20020aa7cf97000000b0051e5322a642mr6088424edx.27.1691004759678; Wed, 02 Aug 2023 12:32:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691004759; cv=none; d=google.com; s=arc-20160816; b=dzw0r/FrrkSXZ9yVAHu8Pc/p00T0rOvcJlSId7h7PlgTjLXA9SYJLX6Xv/H9K/f8Vq 2DBR6cx4GQU6Dt0xxnLoRRgkQBZ5HYSLOQVjGU0A+9hDj4diWWdl9l08tT3DsJUKhQ5m W3kygh0G55+jIpABl28gwWxkdHmXny9FN4A4S2D8UcdIVb552TDZuMk0ZJpNOTm/NHCT eA1fUhMfZUAeY2P/pRq6tNXUx7AiPUh1EJ6gfuA1bYrhqEl7jWOB5I09rPJxolyYN8UG tnqRZxId+e51Ua/O1/kGKuiusCVVDsFZ2rXe+/u7BJp+PyYFVQlR5MiFoUGXKhPtF9q3 5zzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=JxNu19adZsu3M0z/z3GFu4USKc1JYfzjTR+eXKUvlDs=; fh=62usp+BA/7xeLfPNwu+u8vCGnpjk2jo/JMoje4kcTTM=; b=joo4JazHdv/ECTNl1J33botSzO2UUFo9zX9bQbjhSZiltfZvMgGt9Gv8+fwPz3I9tC 7QHuJ1lVh+YHcf3TAK/vRHneutDz2dZpw+UsiswWwAeGHji8xeL7XuSdxPo8G6JYpkBw fN15lKmTwD53SAL8UFlovT7Lkc+uD6jFD0+ZJkMlilCdOlOq32LHJe9C8HX2Ps+6W/lS NKqllb8GHVbCGXjEImjsZ2VKQ+4CDYHvypuqhbifdpKNhi3g1H9MkBT3asJj8T19qbtz tpQrRYbYknUEbuE8+5QHaObCMVaAWe67b38U29VzODudXkvFvHhO68TO2o2B8F855H3i RXnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="WP2U/xqO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ca23-20020aa7cd77000000b00523095eedfbsi380871edb.681.2023.08.02.12.32.16; Wed, 02 Aug 2023 12:32:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="WP2U/xqO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232394AbjHBR1J (ORCPT + 99 others); Wed, 2 Aug 2023 13:27:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232559AbjHBR0s (ORCPT ); Wed, 2 Aug 2023 13:26:48 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 179FA2D6A; Wed, 2 Aug 2023 10:26:44 -0700 (PDT) Received: from rrs24-12-35.corp.microsoft.com (unknown [131.107.147.181]) by linux.microsoft.com (Postfix) with ESMTPSA id 5E652238C435; Wed, 2 Aug 2023 10:26:43 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 5E652238C435 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1690997203; bh=JxNu19adZsu3M0z/z3GFu4USKc1JYfzjTR+eXKUvlDs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WP2U/xqOlg9dXus047uOQXiWeS1uOyD1f5yFXMPeDHHAErxOn36jTxi8wnAmpH02A JU2Ni3Wy3G6AnIKF0bfXMiALAu7srGzIz9tPLmDvmiCjRyzShf36ejAObu/IEqszGv /hdJjYPo0dyRR6HJSdMKGo8WpMTyuOmiLuPaqFKw= From: Easwar Hariharan To: stable@vger.kernel.org Cc: easwar.hariharan@microsoft.com, Robin Murphy , Nicolin Chen , Will Deacon , Catalin Marinas , Jonathan Corbet , Joerg Roedel , Lu Baolu , Jean-Philippe Brucker , Vladimir Oltean , Yicong Yang , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Tomas Krcka , linux-arm-kernel@lists.infradead.org (moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)), linux-doc@vger.kernel.org (open list:DOCUMENTATION), linux-kernel@vger.kernel.org (open list), iommu@lists.linux.dev (open list:IOMMU SUBSYSTEM) Subject: [PATCH v2 6.4 4/4] iommu/arm-smmu-v3: Document nesting-related errata Date: Wed, 2 Aug 2023 17:26:20 +0000 Message-Id: <20230802172620.1628017-5-eahariha@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230802172620.1628017-1-eahariha@linux.microsoft.com> References: <20230802172620.1628017-1-eahariha@linux.microsoft.com> MIME-Version: 1.0 X-Spam-Status: No, score=-19.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773147006854067643 X-GMAIL-MSGID: 1773147006854067643 From: Robin Murphy commit 0bfbfc526c70606bf0fad302e4821087cbecfaf4 upstream Both MMU-600 and MMU-700 have similar errata around TLB invalidation while both stages of translation are active, which will need some consideration once nesting support is implemented. For now, though, it's very easy to make our implicit lack of nesting support explicit for those cases, so they're less likely to be missed in future. Signed-off-by: Robin Murphy Reviewed-by: Nicolin Chen Link: https://lore.kernel.org/r/696da78d32bb4491f898f11b0bb4d850a8aa7c6a.1683731256.git.robin.murphy@arm.com Signed-off-by: Will Deacon Signed-off-by: Easwar Hariharan --- Documentation/arm64/silicon-errata.rst | 4 ++-- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/arm64/silicon-errata.rst b/Documentation/arm64/silicon-errata.rst index b0346968765d..3ce6e4aebdef 100644 --- a/Documentation/arm64/silicon-errata.rst +++ b/Documentation/arm64/silicon-errata.rst @@ -143,9 +143,9 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | ARM | MMU-500 | #841119,826419 | N/A | +----------------+-----------------+-----------------+-----------------------------+ -| ARM | MMU-600 | #1076982 | N/A | +| ARM | MMU-600 | #1076982,1209401| N/A | +----------------+-----------------+-----------------+-----------------------------+ -| ARM | MMU-700 | #2812531 | N/A | +| ARM | MMU-700 | #2268618,2812531| N/A | +----------------+-----------------+-----------------+-----------------------------+ +----------------+-----------------+-----------------+-----------------------------+ | Broadcom | Brahma-B53 | N/A | ARM64_ERRATUM_845719 | 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 7e08ec55df2a..bbad54aa6c8c 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -3457,11 +3457,16 @@ static void arm_smmu_device_iidr_probe(struct arm_smmu_device *smmu) /* Arm erratum 1076982 */ if (variant == 0 && revision <= 2) smmu->features &= ~ARM_SMMU_FEAT_SEV; + /* Arm erratum 1209401 */ + if (variant < 2) + smmu->features &= ~ARM_SMMU_FEAT_NESTING; break; case IIDR_PRODUCTID_ARM_MMU_700: /* Arm erratum 2812531 */ smmu->features &= ~ARM_SMMU_FEAT_BTM; smmu->options |= ARM_SMMU_OPT_CMDQ_FORCE_SYNC; + /* Arm errata 2268618, 2812531 */ + smmu->features &= ~ARM_SMMU_FEAT_NESTING; break; } break;