From patchwork Wed Aug 2 17:09:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Easwar Hariharan X-Patchwork-Id: 130020 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp615285vqx; Wed, 2 Aug 2023 10:30:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlGWj529Hec2vqVk9tKL6MgrvG8oQ53ydfE1f5URl9P+n6AHpsMpSlvpXRu5lHKaCrbErePu X-Received: by 2002:a05:6870:4396:b0:1bb:8b8a:2b1b with SMTP id r22-20020a056870439600b001bb8b8a2b1bmr21460345oah.54.1690997456141; Wed, 02 Aug 2023 10:30:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690997456; cv=none; d=google.com; s=arc-20160816; b=r2YiyZgRlHXSM/uEdDFAAmgagzMD4c3P04p+DdYuHsM0vvFRKvLAzlHD4dPEOXLO9H o7l1klhmwG6iF76zDtzq7PZc/fK4s6q+rzgt7w5rO/DmS+uuRYZjFRpFXq3iAfqxKfgM mqaJ3zvchoh+XNaqPhzseunpwAOn1+1/fmgEiP2AnR4vacLzuitrHnQzHSQU0kHk5ab/ vyHqsfgGalxpsGWRr/AuXgEXdJ85dD6zmnphBe9gG9H0Nm8BwbZitXNi60nbst1Y0CMa m0WzT/Qv9XUHPHb1GbXcVqefiEAIV8BJF4cereHA6QDpIAtTcZJlYashEQZoB8j/jrRv YRjw== 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=NIfkdItr0RVlDTO9mqpTIL61A+YsZheMdyarxG4O/nU=; fh=CDTXYW0Juagvqhn9HJl2Ua5lilyG7Tfej66Vh6SVpaA=; b=ptMXpir6SmQHnLScdPPJSXe9Sv3FqUycnw4E+z00gekHJq/813+s/DKTsNp0ANDVkP VK2uLwBxIjXhH8UjjwOj/lHoVsyP5c6n7nIB2Tf5uAXchWEIL5zf7OZTQrnkLGojlX4t F0rHIqrE2hKrlD0CxUJywQtIJogCVC8GUl6IM+uYRyRhO7YtDWTo1bdxFW83qSDma1Ny K/0yqzpkvROE5qhpSvKgX3PJG0jD8Mto9rx1sgL1SHB4P+9H/3t79PNGoXl3vUpILmFX uFA75SDHCukffYGu3+2asXARtk7JiSH7uN++GB1GVYm1aWgOlMqXFvJH0Aa/DbM8gkue 7PjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=hTfikkjz; 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 t2-20020a63f342000000b00563e09f3c3esi981992pgj.359.2023.08.02.10.30.41; Wed, 02 Aug 2023 10:30:56 -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=hTfikkjz; 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 S231996AbjHBRJi (ORCPT + 99 others); Wed, 2 Aug 2023 13:09:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231743AbjHBRJZ (ORCPT ); Wed, 2 Aug 2023 13:09:25 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 71CD51727; Wed, 2 Aug 2023 10:09:24 -0700 (PDT) Received: from rrs24-12-35.corp.microsoft.com (unknown [131.107.147.181]) by linux.microsoft.com (Postfix) with ESMTPSA id 12B5B238C432; Wed, 2 Aug 2023 10:09:24 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 12B5B238C432 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1690996164; bh=NIfkdItr0RVlDTO9mqpTIL61A+YsZheMdyarxG4O/nU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hTfikkjz0rWW0uTEPWjqVN7uSYV1OhIu6RsZBw0x6DsxoY6G2KpiKbunqftmUXgqK gND87iC+O5opWuZ7k1LWJlETVl6S8AT7ANnAlNsR7gl9lky91Lv5/sSMK5S6XoWf1Q leHJW6fKfEU0k2gl4m1aHFsIpyBPDIPG2GtKFHXk= 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 , Sasha Levin , Tomas Krcka , Yicong Yang , 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-foundation.org (open list:IOMMU DRIVERS), iommu@lists.linux.dev (open list:IOMMU DRIVERS) Subject: [PATCH v2 6.1 4/4] iommu/arm-smmu-v3: Document nesting-related errata Date: Wed, 2 Aug 2023 17:09:11 +0000 Message-Id: <20230802170911.1593275-5-eahariha@linux.microsoft.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230802170911.1593275-1-eahariha@linux.microsoft.com> References: <20230802170911.1593275-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: 1773139348801176500 X-GMAIL-MSGID: 1773139348801176500 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 322df8abbc0e..83a75e16e54d 100644 --- a/Documentation/arm64/silicon-errata.rst +++ b/Documentation/arm64/silicon-errata.rst @@ -122,9 +122,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 7cec4a457d91..340ef116d574 100644 --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c @@ -3487,11 +3487,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;