From patchwork Wed Nov 16 14:09:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anshuman Khandual X-Patchwork-Id: 1764 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp166979wru; Wed, 16 Nov 2022 06:22:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf6SJYiRuZ6isRfbWzsNix+yTsTXjWDVaqnvofhHxJt03nbKP0PU2dM3HGr/xlbuZ+uYgM7B X-Received: by 2002:aa7:9f03:0:b0:56c:a2f1:2783 with SMTP id g3-20020aa79f03000000b0056ca2f12783mr23755360pfr.7.1668608575594; Wed, 16 Nov 2022 06:22:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668608575; cv=none; d=google.com; s=arc-20160816; b=YOAXDycIcj3WCSxYL/nbeDI0Zw9OFhhN8kus4Y4cX7yu/K3sSdnt2actPBG3AzTNDz pUUJaXUDCfptEsrT+DR3gVXntmvA69LKqj72bIB3j1NoN6PxgEbOzWCsHFFbGuANdTYm gl4MJhmOSgJJ4+r4jaaHt5Al2cmSiQbaeMw/zgMbB8rfyLJvOmRmyeROHJPMHh112Zg5 p10BfwoV2aFuZqAE6quZUu5CVOJWm3RWXibBjfavIQLbHujfQF9P5knsz3ddmgveCl0i Aq5+s3l143QPUf/OAhwDRSgN5U5Nhh2i+lOGMgZ5qUpjgjzUz6J2z3Eg7mxJP+dinVi6 z0Hg== 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 :message-id:date:subject:cc:to:from; bh=Gnby6m7dxcT3QEAqQHkZ2PwuYsx8JQkkpVScIkZFEww=; b=KhPqqa3tHRHhSUj1sGymjFjSMguHcduEmgAxzsh2+ek/x2EM+411pRG7nhisIZqeKI EBvderIwVj9BkClJLwMnFO8KGDbj91IP2A/2ZKASWLaqAzPwC+vLx9QAJQZ1t0YqQaW+ 4XjLF4Lq2E16q6HSlxD/OzcAKFqrjXHpJa5Js0LRvH496IEpD05SVyY2ZXaU0jTAqcVe HHcDaY3R9OqSxJjNxLkdXMRJY1rYtnLUReTiYJEyZA+pkthvSGI7FAEkbGoOezJvvjjh 5gPgJHjArBeo8NOYv/p+fTc1MvsqRyc/+b9/16mCNageWEPXp3V+a4eJY1KkLLRk38hn aL/w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d16-20020a170903231000b00186dcc35018si17584115plh.108.2022.11.16.06.22.38; Wed, 16 Nov 2022 06:22:55 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233496AbiKPOKi (ORCPT + 99 others); Wed, 16 Nov 2022 09:10:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231209AbiKPOKN (ORCPT ); Wed, 16 Nov 2022 09:10:13 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5DD6FBA3; Wed, 16 Nov 2022 06:09:29 -0800 (PST) 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 276401477; Wed, 16 Nov 2022 06:09:35 -0800 (PST) Received: from a077893.arm.com (unknown [10.163.40.231]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id EFF573F663; Wed, 16 Nov 2022 06:09:25 -0800 (PST) From: Anshuman Khandual To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, catalin.marinas@arm.com, will@kernel.org Cc: Anshuman Khandual , Suzuki K Poulose , James Morse , Jonathan Corbet , Mark Rutland , linux-doc@vger.kernel.org Subject: [PATCH V3 0/2] arm64: errata: Workaround Cortex-A715 errata #2645198 Date: Wed, 16 Nov 2022 19:39:13 +0530 Message-Id: <20221116140915.356601-1-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749662905760266314?= X-GMAIL-MSGID: =?utf-8?q?1749662905760266314?= This series adds Cortex-A715 partnumber and workarounds the errata #2645198 which gets triggered when an userspace page mapping permission changes from executable to non-executable, corrupting both ESR_EL1/FAR_EL1 registers when an instruction abort is taken. This series applies on v6.1-rc5. The errata description can be found here. https://developer.arm.com/documentation/SDEN2148827/1000/?lang=en Cc: Catalin Marinas Cc: Will Deacon Cc: Suzuki K Poulose Cc: James Morse Cc: Jonathan Corbet Cc: Mark Rutland Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: linux-doc@vger.kernel.org Changes in V3: - Replaced __set_pte_at() with set_pte_at() in ptep_modify_prot_commit() - Dropped local variable 'pte_t pte', replaced with direct READ_ONCE(*ptep) - Moved cpus_have_const_cap() earlier as per Catalin Changes in V2: https://lore.kernel.org/all/20221113012645.190301-1-anshuman.khandual@arm.com/ - Added ptep_modify_prot_start/commit declaration into [asm/pgtable.h] - Moved ptep_modify_prot_start/commit definitions into [arch/arm64/mm/mmu.c] - Above code movements solved ptep_clear_flush() related build dependency - Replaced __flush_tlb_range() with ptep_clear_flush()/huge_ptep_clear_flush() Changes in V1: https://lore.kernel.org/all/20221027023915.1318100-1-anshuman.khandual@arm.com/ Anshuman Khandual (2): arm64: Add Cortex-715 CPU part definition arm64: errata: Workaround possible Cortex-A715 [ESR|FAR]_ELx corruption Documentation/arm64/silicon-errata.rst | 2 ++ arch/arm64/Kconfig | 16 ++++++++++++++++ arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/include/asm/hugetlb.h | 9 +++++++++ arch/arm64/include/asm/pgtable.h | 9 +++++++++ arch/arm64/kernel/cpu_errata.c | 7 +++++++ arch/arm64/mm/hugetlbpage.c | 21 +++++++++++++++++++++ arch/arm64/mm/mmu.c | 21 +++++++++++++++++++++ arch/arm64/tools/cpucaps | 1 + 9 files changed, 88 insertions(+)