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=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 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 6E361C433DB for ; Sat, 13 Mar 2021 15:05:46 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AD98264ED5 for ; Sat, 13 Mar 2021 15:05:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD98264ED5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 10F126B0072; Sat, 13 Mar 2021 10:05:45 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 098676B0073; Sat, 13 Mar 2021 10:05:45 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E56F86B0074; Sat, 13 Mar 2021 10:05:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0211.hostedemail.com [216.40.44.211]) by kanga.kvack.org (Postfix) with ESMTP id C98566B0072 for ; Sat, 13 Mar 2021 10:05:44 -0500 (EST) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 767811800E389 for ; Sat, 13 Mar 2021 15:05:44 +0000 (UTC) X-FDA: 77915175408.15.4936CC2 Received: from smtprelay.test.hostedemail.com (mail.test.hostedemail.com [216.40.41.5]) by imf09.hostedemail.com (Postfix) with ESMTP id 9751C60C637F for ; Sat, 13 Mar 2021 09:40:00 +0000 (UTC) Received: from forelay.test.hostedemail.com (10.5.29.251.rfc1918.com [10.5.29.251]) by smtprelay01.test.hostedemail.com (Postfix) with ESMTP id 5936311CEC for ; Sat, 13 Mar 2021 09:40:01 +0000 (UTC) Received: from forelay.prod.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by fograve01.test.hostedemail.com (Postfix) with ESMTP id 1944C23810 for ; Sat, 13 Mar 2021 09:40:01 +0000 (UTC) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A5632824805A for ; Sat, 13 Mar 2021 09:39:46 +0000 (UTC) X-FDA: 77914353972.30.0A1E88F Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by imf17.hostedemail.com (Postfix) with ESMTP id 0AB574416EDB for ; Sat, 13 Mar 2021 09:26:50 +0000 (UTC) X-Originating-IP: 2.7.49.219 Received: from [192.168.1.100] (lfbn-lyo-1-457-219.w2-7.abo.wanadoo.fr [2.7.49.219]) (Authenticated sender: alex@ghiti.fr) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 8C6861C0008; Sat, 13 Mar 2021 09:26:47 +0000 (UTC) Subject: Re: [PATCH 0/3] Move kernel mapping outside the linear mapping To: Palmer Dabbelt Cc: corbet@lwn.net, Paul Walmsley , aou@eecs.berkeley.edu, Arnd Bergmann , aryabinin@virtuozzo.com, glider@google.com, dvyukov@google.com, linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-arch@vger.kernel.org, linux-mm@kvack.org References: From: Alex Ghiti Message-ID: <0bb85388-c4e1-523a-9bf3-0ccec6c4041e@ghiti.fr> Date: Sat, 13 Mar 2021 04:26:47 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Received-SPF: none (ghiti.fr>: No applicable sender policy available) receiver=imf17; identity=mailfrom; envelope-from=""; helo=relay5-d.mail.gandi.net; client-ip=217.70.183.197 X-HE-DKIM-Result: none/none X-HE-Tag: 1615627610-962871 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 9751C60C637F X-Stat-Signature: 5wudwmat1pcrmbcg18neufnd3q6xfnht Received-SPF: none (ghiti.fr>: No applicable sender policy available) receiver=imf09; identity=mailfrom; envelope-from=""; helo=smtprelay.test.hostedemail.com; client-ip=216.40.41.5 X-HE-DKIM-Result: none/none X-HE-Tag: 1615628400-170415 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000254, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Palmer, Le 3/9/21 =C3=A0 9:54 PM, Palmer Dabbelt a =C3=A9crit=C2=A0: > On Thu, 25 Feb 2021 00:04:50 PST (-0800), alex@ghiti.fr wrote: >> I decided to split sv48 support in small series to ease the review. >> >> This patchset pushes the kernel mapping (modules and BPF too) to the l= ast >> 4GB of the 64bit address space, this allows to: >> - implement relocatable kernel (that will come later in another >> =C2=A0 patchset) that requires to move the kernel mapping out of the l= inear >> =C2=A0 mapping to avoid to copy the kernel at a different physical add= ress. >> - have a single kernel that is not relocatable (and then that avoids t= he >> =C2=A0 performance penalty imposed by PIC kernel) for both sv39 and sv= 48. >> >> The first patch implements this behaviour, the second patch introduces= a >> documentation that describes the virtual address space layout of the=20 >> 64bit >> kernel and the last patch is taken from my sv48 series where I simply=20 >> added >> the dump of the modules/kernel/BPF mapping. >> >> I removed the Reviewed-by on the first patch since it changed enough f= rom >> last time and deserves a second look. >> >> Alexandre Ghiti (3): >> =C2=A0 riscv: Move kernel mapping outside of linear mapping >> =C2=A0 Documentation: riscv: Add documentation that describes the VM l= ayout >> =C2=A0 riscv: Prepare ptdump for vm layout dynamic addresses >> >> =C2=A0Documentation/riscv/index.rst=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= |=C2=A0 1 + >> =C2=A0Documentation/riscv/vm-layout.rst=C2=A0=C2=A0 | 61 +++++++++++++= +++++++++ >> =C2=A0arch/riscv/boot/loader.lds.S=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 |=C2=A0 3 +- >> =C2=A0arch/riscv/include/asm/page.h=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= | 18 ++++++- >> =C2=A0arch/riscv/include/asm/pgtable.h=C2=A0=C2=A0=C2=A0 | 37 ++++++++= +---- >> =C2=A0arch/riscv/include/asm/set_memory.h |=C2=A0 1 + >> =C2=A0arch/riscv/kernel/head.S=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 3 +- >> =C2=A0arch/riscv/kernel/module.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0 6 +-- >> =C2=A0arch/riscv/kernel/setup.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 |=C2=A0 3 ++ >> =C2=A0arch/riscv/kernel/vmlinux.lds.S=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 = 3 +- >> =C2=A0arch/riscv/mm/fault.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 13 +++++ >> =C2=A0arch/riscv/mm/init.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 81 ++++++++++++++++++++++= +------ >> =C2=A0arch/riscv/mm/kasan_init.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 |=C2=A0 9 ++++ >> =C2=A0arch/riscv/mm/physaddr.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 2 +- >> =C2=A0arch/riscv/mm/ptdump.c=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 67 +++++++++++++++++++----- >> =C2=A015 files changed, 258 insertions(+), 50 deletions(-) >> =C2=A0create mode 100644 Documentation/riscv/vm-layout.rst >=20 > This generally looks good, but I'm getting a bunch of checkpatch=20 > warnings and some conflicts, do you mind fixing those up (and including= =20 > your other kasan patch, as that's likely to conflict)? I fixed a few checkpatch warnings and rebased on top of for-next but had=20 not conflicts. I have just sent the v2. Thanks, Alex