From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B9D3C35E0B for ; Tue, 25 Feb 2020 16:27:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D94B12082F for ; Tue, 25 Feb 2020 16:27:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cWyv9iiO"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="d9Q1mYoS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D94B12082F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TmulEG3CEax7aXteGdBGPBUmSzfwZVWicptUXJH6rKc=; b=cWyv9iiOJVWTovCQtDiEqcX5r 4SirAXW04YLo3rFkCGN/IjaCC9J+uWEYsBUf4s9bkOPkHjy76AQ6kXzaPhSjZJZH3EWKUWgs1Bn9n UiTTx0+LTKVNhyUkwqoxJtBSkwFm63IxJGbf4/FrqzePWbHc5FjMlf3dYTEea1IJiL/R6zCrRDiLN yt6PU8HW55FfiQ2cSrVQaeTwHxdSRdQY62TT4QHivsIP7hZxffj91gyAJKpUzlxevH4DoYR3MgFdp Q/7W4ypwm4HyvJniU61vK4t3l9cbEJZLOFbllh8uoh/k3mnm6/ulaK8ZOY1tBdxOeChsF4pz5W1Pk mjIrdn5CQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6d3j-0005zI-GM; Tue, 25 Feb 2020 16:27:47 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j6d3f-0005yb-9Y for linux-arm-kernel@lists.infradead.org; Tue, 25 Feb 2020 16:27:46 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BFEB92082F; Tue, 25 Feb 2020 16:27:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582648062; bh=Umc32ew0zLmKNStf8xcmKMCmOd7hqCKs+LtmwlSo56Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=d9Q1mYoSJmnAolXw9wqbB0NwzLW3rTcfxUm0yiIIjj3DPr8EDbhmZU4jKUuu2kUhc nxD05fkwz6DJ8p8izcdtCRBVFUrrD7F6mB0pUkfGHQVa6GN1+D3D53HSCxRkqAblqm u9UzlFt5HNYf+ZH+mPwfMyZVOuDwTJjdpPCTgS1o= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j6d3d-007ryW-3D; Tue, 25 Feb 2020 16:27:41 +0000 MIME-Version: 1.0 Date: Tue, 25 Feb 2020 16:27:41 +0000 From: Marc Zyngier To: Tim Harvey Subject: Re: ARM64_SW_TTBR0_PAN enabled causing hangs on OcteonTX In-Reply-To: References: <6f3ce71073f38fbd4e0f7b75852a8846@kernel.org> Message-ID: X-Sender: maz@kernel.org User-Agent: Roundcube Webmail/1.3.10 X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: tharvey@gateworks.com, linux-arm-kernel@lists.infradead.org, will@kernel.org, catalin.marinas@arm.com, sgoutham@marvell.com, rrichter@marvell.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200225_082744_328873_D789568B X-CRM114-Status: GOOD ( 21.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Robert Richter , Will Deacon , Sunil Goutham , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-02-25 16:13, Tim Harvey wrote: > On Mon, Feb 24, 2020 at 5:55 PM Marc Zyngier wrote: >> >> On 2020-02-25 01:16, Tim Harvey wrote: >> > On Mon, Feb 24, 2020 at 4:50 PM Marc Zyngier wrote: >> >> >> >> Tim, >> >> >> >> On 2020-02-25 00:35, Tim Harvey wrote: >> >> > Greetings, >> >> > >> >> > I'm trying to understand why enabling CONFIG_ARM64_SW_TTBR0_PAN on an >> >> > OcteonTX (CN80XX) SoC would cause the kernel to hang. >> >> > >> >> > Here's what I'm seeing using arch/arm64/defconfig + >> >> > CONFIG_ARM64_SW_TTBR0_PAN=y on a Gateworks Newport board with a >> >> > CN8030-1500BG676-SCP-P12-G SoC using the Marvell SDK-10.1.1.0 boot >> >> > firmware: >> >> > >> >> > Starting kernel ... >> >> > >> >> > [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x430f0a22] >> >> > [ 0.000000] Linux version 5.5.0-00001-g2028a3b (tharvey@tharvey) >> >> > (gcc version 7.3.0 (Marvell Inc. Version: Marvell GCC7 build 238.0)) >> >> > #2 SMP PREEMPT Mon Feb 24 16:20:24 PST 2020 >> >> > [ 0.000000] Machine model: Gateworks Newport CN80XX GW6404 >> >> > [ 0.000000] efi: Getting EFI parameters from FDT: >> >> > [ 0.000000] efi: UEFI not found. >> >> > [ 0.000000] cma: Reserved 64 MiB at 0x000000007c000000 >> >> > [ 0.000000] NUMA: NODE_DATA [mem 0x7bbe5100-0x7bbe6fff] >> >> > [ 0.000000] Zone ranges: >> >> > [ 0.000000] DMA [mem 0x0000000000500000-0x000000003fffffff] >> >> > [ 0.000000] DMA32 [mem 0x0000000040000000-0x000000007fffffff] >> >> > [ 0.000000] Normal empty >> >> > [ 0.000000] Movable zone start for each node >> >> > [ 0.000000] Early memory node ranges >> >> > [ 0.000000] node 0: [mem 0x0000000000500000-0x000000007fffffff] >> >> > [ 0.000000] Initmem setup node 0 [mem >> >> > 0x0000000000500000-0x000000007fffffff] >> >> > [ 0.000000] On node 0 totalpages: 523008 >> >> > [ 0.000000] DMA zone: 4076 pages used for memmap >> >> > [ 0.000000] DMA zone: 0 pages reserved >> >> > [ 0.000000] DMA zone: 260864 pages, LIFO batch:63 >> >> > [ 0.000000] DMA32 zone: 4096 pages used for memmap >> >> > [ 0.000000] DMA32 zone: 262144 pages, LIFO batch:63 >> >> > [ 0.000000] psci: probing for conduit method from DT. >> >> > [ 0.000000] psci: PSCIv1.1 detected in firmware. >> >> > [ 0.000000] psci: Using standard PSCI v0.2 function IDs >> >> > [ 0.000000] psci: Trusted OS resident on physical CPU 0x0 >> >> > [ 0.000000] psci: SMC Calling Convention v1.1 >> >> > [ 0.000000] percpu: Embedded 22 pages/cpu s53016 r8192 d28904 u90112 >> >> > [ 0.000000] pcpu-alloc: s53016 r8192 d28904 u90112 alloc=22*4096 >> >> > [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 >> >> > [ 0.000000] Detected VIPT I-cache on CPU0 >> >> > [ 0.000000] CPU features: detected: GIC system register CPU >> >> > interface >> >> > [ 0.000000] CPU features: detected: Cavium erratum 30115 >> >> > [ 0.000000] CPU features: detected: Kernel page table isolation >> >> > (KPTI) >> >> >> >> If this CPU is just another version of TX1, KPTI shouldn't get enabled >> >> on >> >> this HW, as it definitely breaks (see erratum 27456 and its >> >> consequences). >> >> Can you please enable CONFIG_CAVIUM_ERRATUM_27456 and report back? >> >> >> > >> > Marc, >> > >> > This is a CN8030 Pass 1.2 part so erratum 27456 does appear to be >> > needed and it is indeed enabled already in the kernel by default. >> >> And yet the kernel doesn't seem to detect an affected silicon. >> Can you please apply the following patch and report what happens >> (including the full dmesg): >> >> diff --git a/arch/arm64/kernel/cpu_errata.c >> b/arch/arm64/kernel/cpu_errata.c >> index 703ad0a84f99..c0890d882e56 100644 >> --- a/arch/arm64/kernel/cpu_errata.c >> +++ b/arch/arm64/kernel/cpu_errata.c >> @@ -672,7 +672,7 @@ const struct midr_range >> cavium_erratum_27456_cpus[] >> = { >> /* Cavium ThunderX, T88 pass 1.x - 2.1 */ >> MIDR_RANGE(MIDR_THUNDERX, 0, 0, 1, 1), >> /* Cavium ThunderX, T81 pass 1.0 */ >> - MIDR_REV(MIDR_THUNDERX_81XX, 0, 0), >> + MIDR_ALL_VERSIONS(MIDR_THUNDERX_81XX), >> {}, >> }; >> #endif >> > > Marc, > > That does enable the erratum, disable KPTI and boot properly but I > misread the erratum and it shouldn't be needed for T81 pass 1.2... the > erratum is documented only needed for pass 1.0. Can you then remove the patch *and* disable KPTI? TX1 is broken beyond recognition and KPTI is known to explode on this HW (which is why we disable KPTI on it). We always attributed it to this erratum, but in the absence of any help from Cavium to identify the problem, we just keyed it on that. *IF* this HW is indeed unaffected by it, then it is probably the mix of KPTI and SWPAN that triggers the issue. If my suspicion is correct, you'll need to have a chat with Cavium/Marvell to understand what is happening there. M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel