Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp1434143img; Tue, 26 Feb 2019 22:20:51 -0800 (PST) X-Google-Smtp-Source: AHgI3IZvJTO63ERYnsTxxpZyhCitOmO13v8+Clab/lrGYcRGHQwHGjKBHgeJzQ5kbYYrZtDPn99M X-Received: by 2002:a63:6cc1:: with SMTP id h184mr1432829pgc.151.1551248450977; Tue, 26 Feb 2019 22:20:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551248450; cv=none; d=google.com; s=arc-20160816; b=Gb9AMf1KG4vOM+QZr8z/YQRtJLe2Le7EQkHkB818tTn523Nah1L2kTdaxd6HrI3jDh GpZOoIEKplVj/zDioqR5XP0XhF7IWkKX87CguVlV65h3XS1btZHvHng5+9g+BIOcXeDy v0Kg/QcGF8dtWAHG3/JYQjN1MYL3kNquB6nXQrnKplqQ4ixDtsewYvXwDglxLYFgbRIX UAFMwq46qw7h857dosEjtttHlT4Lz8yYlwgHAqUZX5WTT1sBIF1Yo8zKOsylRbM/sgOl OYaHZny7NcCDYoxg8OAHx1YrLQr4+2ckcM9Wpo/raJmw7Szi+rHN5A0LDqknYUGyTIvA NIZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=8end35o/iydXlHrFEMzxEuF71z+PcIFkaEnIMDrkepw=; b=UjIEr4+WDcjT457PbEb4upoGuBuhP5A3RsQBTQyhvopU/d1hTLxLJO142lK5UzIljE +ajZxIS7QHHFw5IdpSkgRaTjLwKl+gz+eUQ+gfAsN5s/PmvqjfVgFlh3d9xoPKEWLHjf 0/71U01FqOFoJCLq1Uc5Mkr0i8FDRJFTybMutd3/sCzJaZv1X2C8NbEpBiHBiCFR8nLk Qmj9OyOB3TI9wDm5QWiRzRleIeZHbZ44xNvrPxvWA8RIdjChgjymZrsAnL+U7DoMTO8w zVx2mYyyPlJaPfQsIEyX0+c/HmoAcFKo3P7n6uNCVAE+V0y63T/y+WjyTL80mIDWPIxl dBZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p6si10385548pga.151.2019.02.26.22.20.35; Tue, 26 Feb 2019 22:20:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729793AbfB0GUN (ORCPT + 99 others); Wed, 27 Feb 2019 01:20:13 -0500 Received: from mgwkm04.jp.fujitsu.com ([202.219.69.171]:45956 "EHLO mgwkm04.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729529AbfB0GUM (ORCPT ); Wed, 27 Feb 2019 01:20:12 -0500 Received: from ttb-m1.gw.nic.fujitsu.com (unknown [192.168.231.165]) by mgwkm04.jp.fujitsu.com with smtp id 2b54_1a46_c64b7e80_940e_4968_b273_3405b670eda3; Wed, 27 Feb 2019 15:20:08 +0900 Received: from g01jpfmpwkw03.exch.g01.fujitsu.local (g01jpfmpwkw03.exch.g01.fujitsu.local [10.0.193.57]) by ttb-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id E615840ABA29 for ; Wed, 27 Feb 2019 15:20:05 +0900 (JST) Received: from G01JPEXCHKW16.g01.fujitsu.local (G01JPEXCHKW16.g01.fujitsu.local [10.0.194.55]) by g01jpfmpwkw03.exch.g01.fujitsu.local (Postfix) with ESMTP id 077F2BD66DF; Wed, 27 Feb 2019 15:20:05 +0900 (JST) Received: from G01JPEXMBKW03.g01.fujitsu.local ([10.0.194.67]) by g01jpexchkw16 ([10.0.194.55]) with mapi id 14.03.0415.000; Wed, 27 Feb 2019 15:20:05 +0900 From: "Zhang, Lei" To: 'James Morse' CC: Mark Rutland , 'Catalin Marinas' , 'Will Deacon' , "'linux-kernel@vger.kernel.org'" , "'linux-arm-kernel@lists.infradead.org'" Subject: RE: [PATCH v4] arm64: Add workaround for Fujitsu A64FX erratum 010001 Thread-Topic: [PATCH v4] arm64: Add workaround for Fujitsu A64FX erratum 010001 Thread-Index: AdTENhuVebuKtHOoRzCPb6sZ5vznO///+H8AgAAo/wD//jk2sP/v2FHAgCMpHID//QDzQA== Date: Wed, 27 Feb 2019 06:20:04 +0000 Message-ID: <8898674D84E3B24BA3A2D289B872026A6A3336C8@G01JPEXMBKW03> References: <8898674D84E3B24BA3A2D289B872026A6A311EAE@G01JPEXMBKW03> <20190214155605.GC27547@lakrids.cambridge.arm.com> <90347cf4-4d7b-d553-d4db-1bacd000ff75@arm.com> <8898674D84E3B24BA3A2D289B872026A6A313313@G01JPEXMBKW03> <8898674D84E3B24BA3A2D289B872026A6A319D26@G01JPEXMBKW03> In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-securitypolicycheck: OK by SHieldMailChecker v2.2.3 x-shieldmailcheckerpolicyversion: FJ-ISEC-20140219 x-originating-ip: [10.18.70.198] Content-Type: text/plain; charset="iso-2022-jp" MIME-Version: 1.0 X-SecurityPolicyCheck-GC: OK by FENCE-Mail X-TM-AS-GCONF: 00 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi James, > -----Original Message----- > From: linux-arm-kernel On > Behalf Of James Morse > Sent: Tuesday, February 26, 2019 2:29 AM > To: Zhang, Lei/張 雷 > Cc: Mark Rutland ; 'Catalin Marinas' > ; 'Will Deacon' ; > 'linux-kernel@vger.kernel.org' ; > 'linux-arm-kernel@lists.infradead.org' > Subject: Re: [PATCH v4] arm64: Add workaround for Fujitsu A64FX erratum > 010001 > > Hi Zhang, > > On 23/02/2019 13:06, Zhang, Lei wrote: > > Zhang, Lei wrote: > >> I think you mean it may be a problem to modify the KPTI trampoline > >> because some patches about KPTI will be merged to mainline in the near > future. > >> I understood that. > >> I should discuss with my colleagues whether we can set NFDx=0 all of > >> time on A64FX. > > > > The result of our investigation also supports your suggestion. > > We surely agree with you that your proposed method (never set NFDx=1 > > on A64FX) is the best to resolve this erratum. > > > > For this erratum, James's patch should be merged to mainline instead > > of my previous patches (v1 to v4). > > Since KPTI fully covers the effect of NFD1 for A64FX, KPTI is > > recommended to be used in conjunction with James’s patch. > > >> And thanks for your patch. > >> If we can set NFDx=0 all of time, I will review, test and report the result. > > > > I have already tested James's patch on A64FX, and the result is no problem at > all. > > > > Tested-by:zhang.lei > > Thanks, I'll post it properly with this tag. [>] I saw v5 patch you posted. Thanks a lot. > > > >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index > >> a4168d366127..b0b7f1c4e816 100644 > >> --- a/arch/arm64/Kconfig > >> +++ b/arch/arm64/Kconfig > >> @@ -643,6 +643,25 @@ config QCOM_FALKOR_ERRATUM_E1041 > >> > >> If unsure, say Y. > >> > >> +config FUJITSU_ERRATUM_010001 > >> + bool "Fujitsu-A64FX erratum E#010001: Undefined fault may occur > wrongly" > >> + default y > >> + help > >> + This option adds workaround for Fujitsu-A64FX erratum E#010001. > >> + On some variants of the Fujitsu-A64FX cores version (1.0, 1.1), > memory > >> + accesses may cause undefined fault (Data abort, DFSC=0b111111). > >> + This fault occurs under a specific hardware condition when a > >> + load/store instruction performs an address translation using: > >> + case-1 TTBR0_EL1 with TCR_EL1.NFD0 == 1. > >> + case-2 TTBR0_EL2 with TCR_EL2.NFD0 == 1. > >> + case-3 TTBR1_EL1 with TCR_EL1.NFD1 == 1. > >> + case-4 TTBR1_EL2 with TCR_EL2.NFD1 == 1. > >> + > >> + The workaround is to ensure these bits are clear in TCR_ELx. > >> + The workaround only affect the Fujitsu-A64FX. > > > > I think it is better to add a notice here as follows: > > > > Recommend to enable KPTI (UNMAP_KERNEL_AT_EL0 = y). > > That unmap option is on by default, you can't turn it off without > CONFIG_EXPERT. While I agree, I don't think we need to spell this out. [>] I agree with you (that there is no need to mention here). Thank you for your suggestion. Best Regards, Zhang Lei