Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3272785pxb; Sat, 9 Oct 2021 06:20:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsayxfi0DJJO3BpapAmTNAuIJXomzkKRFNpVwLYeWmZKBo0UGFdbEGDbBHjzxRJJn8+y1I X-Received: by 2002:a17:902:a38b:b0:13d:9c41:92ec with SMTP id x11-20020a170902a38b00b0013d9c4192ecmr14890657pla.39.1633785606295; Sat, 09 Oct 2021 06:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633785606; cv=none; d=google.com; s=arc-20160816; b=WLPrI0+mljCSMAGA/RlAHp7uvmDtrRKz0212jcs0kW5e8LByimy/Zl7rpz75LOwAkc +6zHk8h1xoeOy4mm861Q0vZ+7pOlPGH1R8Q+Kk35xEU/+N5PUQ7g1+0znyQqVvRYA7iC z2GH0qu8VyYDDbdGFoexW2//JxRqSmYUl19zCTUruT48LRBuE++cGSpaMnxKTYvq2P9W hwK9nnwQqLFuOErAMMby6Y3U1zublZJR9u8BY6vE59+jWOWYXjntVfep3O8xnM7PBmna sGexmpRGD0Y+YgXqRnVgvjuHxnJR3S7B/N8YgOEW50YE/J8DMNQxU9dTFscD7/oLHGxu iZJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :organization:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=/2f9lgyM6D3VHB26++qIKK7OZXjeg2HWBM5aKGHFpBU=; b=PdKpyHKia54Ha9WNUV8Blx/7beohXdtxJmB/iulBfReo+ccoMuydW6OS45k/Yo5dLI mKIQySMDKuWM76RC+G84lS5dNZl11R5TrixSu9DxJcuafgofddRJn7veiLfNCahFRpzr j9Fdh9C75RZANAfXgOVIDTjb/vCB7PcypQzMTuSvbOI1O7KyAmmr1EhZpVtZ5kJI4jHb dc/QTM/E0WIoa7WCoxxX9kTyRr0ygqa8aPN7xgU3otUPUY6IQdL1DAPprbb570EH82VO NJVW+RTp3hYTBQlxNayYo1iE6c/OoAqrxL2fKIYaSyyV0RgvqYfWhsxiGphexpFiUlmg bIBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@ics.forth.gr header.s=av header.b=Qwc+i07q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ics.forth.gr Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si2069645pjq.23.2021.10.09.06.19.52; Sat, 09 Oct 2021 06:20:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@ics.forth.gr header.s=av header.b=Qwc+i07q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ics.forth.gr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233227AbhJINUy (ORCPT + 99 others); Sat, 9 Oct 2021 09:20:54 -0400 Received: from mailgate.ics.forth.gr ([139.91.1.2]:17795 "EHLO mailgate.ics.forth.gr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233191AbhJINUx (ORCPT ); Sat, 9 Oct 2021 09:20:53 -0400 Received: from av3.ics.forth.gr (av3in.ics.forth.gr [139.91.1.77]) by mailgate.ics.forth.gr (8.15.2/ICS-FORTH/V10-1.8-GATE) with ESMTP id 199DIstP033910 for ; Sat, 9 Oct 2021 16:18:54 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; d=ics.forth.gr; s=av; c=relaxed/simple; q=dns/txt; i=@ics.forth.gr; t=1633785529; x=1636377529; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ckKyUHmU7gJo2+oFHkmh6RC60f+uVdxjSMn5gB9IgbY=; b=Qwc+i07qGWbXH0b7vJAVLxw2ZH19m7ZBDydSyaSvcejdyZ+1gqm8MnOTOwKFoNrn CdRJJiEhrP4SakknRldySe4UGSZfma8xQYc1afXgu4/4eDsweJ1ECdM0gTNIDMah uY8tEwUKG0dHT5VWwmg+ncmWLYR32B82AX8sWyK8S5GZ9BlMwdo/cewHxktW1fMh rIIjtpHgWRIMQofUcOWskTYGKbYKf/jDt2ohegLKJA1bzB6RAQg63lZVXXK2JPns r8d7vt6geI6k04qIc1yIr8TRqeSfL2vVPsKA8QtvENwxG6GCxKbJRSCINc7Vf/m/ fL2VcXEuA83eSZyOhD7Y1g==; X-AuditID: 8b5b014d-b84f570000005d46-85-616196b990c7 Received: from enigma.ics.forth.gr (enigma.ics.forth.gr [139.91.151.35]) by av3.ics.forth.gr (Symantec Messaging Gateway) with SMTP id 4E.86.23878.9B691616; Sat, 9 Oct 2021 16:18:49 +0300 (EEST) X-ICS-AUTH-INFO: Authenticated user: at ics.forth.gr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Sat, 09 Oct 2021 16:18:48 +0300 From: Nick Kossifidis To: Alexandre Ghiti Cc: Nick Kossifidis , Palmer Dabbelt , Paul Walmsley , Albert Ou , linux-riscv , "linux-kernel@vger.kernel.org List" Subject: Re: [PATCH] riscv: Don't use va_pa_offset on kdump Organization: FORTH In-Reply-To: References: <20211002122026.1451269-1-mick@ics.forth.gr> Message-ID: X-Sender: mick@mailhost.ics.forth.gr User-Agent: Roundcube Webmail/1.3.16 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLLMWRmVeSWpSXmKPExsXSHT1dWXfntMREgxlfJC3WLbrAarH19yx2 i8u75rBZbPvcwmbR/O4cu8XLyz3MFm2z+B3YPWY19LJ5vHn5ksXjcMcXdo+Hmy4xeWxeUu9x qfk6u8fnTXIB7FFcNimpOZllqUX6dglcGUtaZrIUbOaqmHf6NnsDYydHFyMnh4SAiUTb/MWs XYxcHEICRxklDs1oYIZImErM3tvJCGLzCghKnJz5hAXEZhawkJh6ZT8jhC0v0bx1Nlg9i4Cq RN/lT2wgNpuApsT8SwfB6kUEjCUen5jIDLKAWWALk8TP00fYQRLCAtYSHb8eg9n8AsISn+5e ZAWxOQUCJTY9uwc2VEigXmLLtW1MEEe4SOybO4UN4jgViQ+/HwD1cnCIAtmb5ypNYBScheTU WUhOnYXk1AWMzKsYBRLLjPUyk4v10vKLSjL00os2MYJjgNF3B+PtzW/1DjEycTAeYpTgYFYS 4dUySUwU4k1JrKxKLcqPLyrNSS0+xCjNwaIkzsurNyFeSCA9sSQ1OzW1ILUIJsvEwSnVwGSw 5ruPkY3r7XOrlqRtNmWsenIj6vXyx/uTPx9qjGC2m9/xImfnknXiLz+02Nf4aj1vV3ruXlO1 c9LWbW3qb5hn8HYkuUYYiLGelZ0pffCr641/SzZeSdsomj+h0f1vRNSXvW2XU25K8cQcnSb5 bpbP1sfiQS4tDhXKEifsOcIL/zI9PqRV37ivktn1k5zUAr/essre4oK13+/NW5z/XHjd74Rf D/xrFKPL7rboV/ctyPy24EQQb+Rtn8e/WabW/tYvlme8/r39QqdlosT9uCmxs8LUvzPcNbPP kfSundW0lyuJdf7pK1Pku1tur6lReezOM1NU31to0fs5cTuSZGe2z7GYmOlb2/FA9cABUyWW 4oxEQy3mouJEANaGCTzwAgAA Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Στις 2021-10-06 14:13, Alexandre Ghiti έγραψε: >> + >> + /* This will trigger a jump to CSR_STVEC anyway */ >> jalr zero, a2, 0 > > The last jump to a2 can be removed since the fault will be triggered > before even reaching this instruction. > Just switching SATP to zero doesn't generate a trap unless mstatus.TVM is set (for visualization purposes). The hart will try and execute the next instruction but it's not clear in the spec what happens in case the code is cached, I don't want to rely solely on STVEC. I prefer having this instruction there, note that some earlier QEMU versions also had this behavior (the original kdump patch didn't set STVEC and it worked fine after setting SATP to zero). > > This patch fixes a regression introduced when moving the kernel to the > end of the address space, so we should add: > Fixes: 2bfc6cd81bd1 ("riscv: Move kernel mapping outside of linear > mapping") > > And it should be backported to 5.13 and 5.14. It seems that the > following tags should be enough: > > Cc: # 5.13 > Cc: # 5.14 > > And finally, you can add: > > Reviewed-by: Alexandre Ghiti > ACK, thanks ! I'll resend the patch with the tags you mentioned. Regards, Nick