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=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 17B29C433DB for ; Wed, 17 Mar 2021 05:05:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 845E264FAB for ; Wed, 17 Mar 2021 05:05:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 845E264FAB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9FE1B6B006E; Wed, 17 Mar 2021 01:05:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9AD116B0070; Wed, 17 Mar 2021 01:05:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 84D946B0071; Wed, 17 Mar 2021 01:05:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0006.hostedemail.com [216.40.44.6]) by kanga.kvack.org (Postfix) with ESMTP id 695B36B006E for ; Wed, 17 Mar 2021 01:05:30 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 226D58249980 for ; Wed, 17 Mar 2021 05:05:30 +0000 (UTC) X-FDA: 77928178020.02.AD0ED10 Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) by imf26.hostedemail.com (Postfix) with ESMTP id 8BDE2407F8DF for ; Wed, 17 Mar 2021 05:05:29 +0000 (UTC) Received: by mail-pf1-f181.google.com with SMTP id h3so289555pfr.12 for ; Tue, 16 Mar 2021 22:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=MIc7mavbJhN4OuOMILSSjW63cQv0oc3j9t7W7Zfvn3k=; b=fU9xwamVIvSaTTINr66eyaN/9vLWy/U3RHTRoQtlV+QGM22cjCkVK6UdNds3atZs+v lwrY+tDyL/ppBr9hKvCmc5IxfzdMip2gaTAgZDGXQ6Xs04cFN2LQ24LlJRHotVOKvUCH 3JTOqAzlDX8icJ+kSfK70sn7CrFvm1RYy3tiSUBmK5a1Qe6+mTFpFeTnFypUUxw9fUu+ hmf2R+m08ZuVrQbnJz+5Z8NNKAvjRoeEgTM+fUUo3ZGYXk8A+F9ucXE8MBG9I3okFz/m 2Vpx5x4E0li1OV10ow0sYyZw5BNS2RTRFdcPPoFDjl2yv+JiAs3XTkXMoVO32+7qLasj 1GLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=MIc7mavbJhN4OuOMILSSjW63cQv0oc3j9t7W7Zfvn3k=; b=NzGhF3rfG5YuAS7DSH2wCrQjXWKz0zzcBV75BWpc72w5oJIJmiwNs1BcAjYQan179m 6RvNojAJ+cwpFbg4SAUJ+Uan5YlVlNtiPTa5VaffHn7gd6HNESDCiBYiEC9pZJ1moJYQ ggW2z/KQ+5sBZb/KFztMHCKAwUvSHplEBfksAu3SHEMIrP6JFrBl4WKWc+ybEE4BNvoS 6BvSd+ePpQFEI2YBO72HE/VHqWbP1NfA0lwi/MxBBTO/HYCYOilQTu1urJMmlRliEH5z v2t4ONP6notWJp8opxWS9ygHTsmr/xLkOttixwvZ7LlDLPku+z/xs1St3p96+YlWhf8M WeaQ== X-Gm-Message-State: AOAM532hsFvKPya6aJS4MOxeE2dk4olmS/n8QwFYGozF+7fmTu+bVR8n tZjjakMAI69jcmXz4TXyHYU4Tw== X-Google-Smtp-Source: ABdhPJyDuEZydtGMqDr8/DG+kP9sdLoSZtmtej+zUMoDcsn6rZDQkEvlHQ9u8k2GdIn70gdBhSt7iA== X-Received: by 2002:a62:e708:0:b029:1f8:c092:ff93 with SMTP id s8-20020a62e7080000b02901f8c092ff93mr2675554pfh.21.1615957528395; Tue, 16 Mar 2021 22:05:28 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id i17sm19789935pfq.135.2021.03.16.22.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Mar 2021 22:05:27 -0700 (PDT) Date: Tue, 16 Mar 2021 22:05:27 -0700 (PDT) X-Google-Original-Date: Tue, 16 Mar 2021 21:58:03 PDT (-0700) Subject: Re: [PATCH 0/3] Move kernel mapping outside the linear mapping In-Reply-To: <0bb85388-c4e1-523a-9bf3-0ccec6c4041e@ghiti.fr> 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 From: Palmer Dabbelt To: alex@ghiti.fr Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed X-Stat-Signature: yoinrjw7prwgf88abzcw75tieukt8zxr X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 8BDE2407F8DF Received-SPF: none (dabbelt.com>: No applicable sender policy available) receiver=imf26; identity=mailfrom; envelope-from=""; helo=mail-pf1-f181.google.com; client-ip=209.85.210.181 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615957529-89783 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, 13 Mar 2021 01:26:47 PST (-0800), alex@ghiti.fr wrote: > 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 = last >>> 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 = linear >>> =C2=A0 mapping to avoid to copy the kernel at a different physical ad= dress. >>> - have a single kernel that is not relocatable (and then that avoids = the >>> =C2=A0 performance penalty imposed by PIC kernel) for both sv39 and s= v48. >>> >>> The first patch implements this behaviour, the second patch introduce= s a >>> documentation that describes the virtual address space layout of the >>> 64bit >>> kernel and the last patch is taken from my sv48 series where I simply >>> added >>> the dump of the modules/kernel/BPF mapping. >>> >>> I removed the Reviewed-by on the first patch since it changed enough = from >>> 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 = layout >>> =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 >> >> This generally looks good, but I'm getting a bunch of checkpatch >> warnings and some conflicts, do you mind fixing those up (and includin= g >> your other kasan patch, as that's likely to conflict)? > > > I fixed a few checkpatch warnings and rebased on top of for-next but ha= d > not conflicts. > > I have just sent the v2. Thanks. These (and the second patch of the one I just put on fixes) are for-next things, so I'm not going to get a look at them tonight because I= want to make sure we don't have any more fixes outstanding.