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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 BE568C433E0 for ; Wed, 10 Mar 2021 02:54:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0F4FD64FE9 for ; Wed, 10 Mar 2021 02:54:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F4FD64FE9 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 42D978D0162; Tue, 9 Mar 2021 21:54:32 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 3DD308D0148; Tue, 9 Mar 2021 21:54:32 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 27DB28D0162; Tue, 9 Mar 2021 21:54:32 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0141.hostedemail.com [216.40.44.141]) by kanga.kvack.org (Postfix) with ESMTP id 0D6808D0148 for ; Tue, 9 Mar 2021 21:54:32 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id B9E2E824999B for ; Wed, 10 Mar 2021 02:54:31 +0000 (UTC) X-FDA: 77902446342.18.AA7E3C1 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by imf03.hostedemail.com (Postfix) with ESMTP id B55AFC0001FE for ; Wed, 10 Mar 2021 02:54:28 +0000 (UTC) Received: by mail-pf1-f182.google.com with SMTP id a188so11067311pfb.4 for ; Tue, 09 Mar 2021 18:54:30 -0800 (PST) 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=YBxARwCSnvP/MPs48fuZLZiuQ0mo/90Nc+1kxldAXvY=; b=mgPjitELPEW/P5qmpcLVfVoA0D6sHZbihRmkHn2T6K9SBG4Ha/LJO/otu10peacMhr LuL0fRZdQLwP7M9wEDrTpBtLj8K8tudZNldX6kZxxwpgoOUxKITkywSl2jzbDDQ+LlzB pAfWpubnARGarXUbdueVAOGEZZwgdwg38kjUrvpm8UlRyhUcHqhOLh/KTMLubon7Kb4n SDBddPEB0kPjpJ49JkLLyjwoA35CMpN5HTgdd0VAg06YzUz21lg3gZ8E6/aU6kC48WxF Iv+Fz7wjENWwmVReUBuT2iyV4vRqfYBaKfQMpvTe0Mkt1040FtnGxaGlyV9nF1Rgq6o4 4rKA== 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=YBxARwCSnvP/MPs48fuZLZiuQ0mo/90Nc+1kxldAXvY=; b=pFc9HDWIc5JEttN+czToti3/tm1qp4RZFG7nrMwmxlCZupj9d1Qxh2nV3B5+542tm0 ZQFk+FA0EExyM6TklRCrF3ctT9d12J3gXhUic20YRCSFnOYf6M202OnrlCsXuzmIz2hj +tfgqkMcBrv0unmTWxIEXHM99LpssD9zeNyBegVoX4Avr7B7ME6czUy5qhRmAj2r3knT xgoKQLoYNu8Vj5a1o9opAVHXWtezagxnEyazQPsCIAZ/gsdC6/RpRt79LmsJi1YEhSoR oHEoqBx7DUetDPluG+QqTfEC2pgYtdT9ev/aYJWIIhwi5bFX6PBCXCHBgN7RvhzsHb0q 6Eag== X-Gm-Message-State: AOAM532PYZ8EmiUGMMCqj4EbvNDZ8wIul5R0O2bGs2S10Cj3dTD91pZ+ gyWKvNPPVvwzva6RNXlstnRRVg== X-Google-Smtp-Source: ABdhPJw9djyUJKGf+CL7k+IvlqXvhXmzFMbBeiDmFCthoAskqXlsDt4pmgMsgrh8nJwik7OuxQCByg== X-Received: by 2002:a62:b410:0:b029:1a4:7868:7e4e with SMTP id h16-20020a62b4100000b02901a478687e4emr891769pfn.62.1615344869693; Tue, 09 Mar 2021 18:54:29 -0800 (PST) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id v1sm4250210pjt.1.2021.03.09.18.54.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 18:54:28 -0800 (PST) Date: Tue, 09 Mar 2021 18:54:28 -0800 (PST) X-Google-Original-Date: Tue, 09 Mar 2021 18:54:03 PST (-0800) Subject: Re: [PATCH 0/3] Move kernel mapping outside the linear mapping In-Reply-To: <20210225080453.1314-1-alex@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, alex@ghiti.fr From: Palmer Dabbelt To: alex@ghiti.fr Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: B55AFC0001FE X-Stat-Signature: j14z8zoxhngd81yfh5hoi49sipgp3so7 Received-SPF: none (dabbelt.com>: No applicable sender policy available) receiver=imf03; identity=mailfrom; envelope-from=""; helo=mail-pf1-f182.google.com; client-ip=209.85.210.182 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615344868-175528 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 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 la= st > 4GB of the 64bit address space, this allows to: > - implement relocatable kernel (that will come later in another > patchset) that requires to move the kernel mapping out of the linear > mapping to avoid to copy the kernel at a different physical address. > - have a single kernel that is not relocatable (and then that avoids th= e > performance penalty imposed by PIC kernel) for both sv39 and sv48. > > The first patch implements this behaviour, the second patch introduces = a > documentation that describes the virtual address space layout of the 64= bit > kernel and the last patch is taken from my sv48 series where I simply a= dded > the dump of the modules/kernel/BPF mapping. > > I removed the Reviewed-by on the first patch since it changed enough fr= om > last time and deserves a second look. > > Alexandre Ghiti (3): > riscv: Move kernel mapping outside of linear mapping > Documentation: riscv: Add documentation that describes the VM layout > riscv: Prepare ptdump for vm layout dynamic addresses > > Documentation/riscv/index.rst | 1 + > Documentation/riscv/vm-layout.rst | 61 ++++++++++++++++++++++ > arch/riscv/boot/loader.lds.S | 3 +- > arch/riscv/include/asm/page.h | 18 ++++++- > arch/riscv/include/asm/pgtable.h | 37 +++++++++---- > arch/riscv/include/asm/set_memory.h | 1 + > arch/riscv/kernel/head.S | 3 +- > arch/riscv/kernel/module.c | 6 +-- > arch/riscv/kernel/setup.c | 3 ++ > arch/riscv/kernel/vmlinux.lds.S | 3 +- > arch/riscv/mm/fault.c | 13 +++++ > arch/riscv/mm/init.c | 81 +++++++++++++++++++++++------ > arch/riscv/mm/kasan_init.c | 9 ++++ > arch/riscv/mm/physaddr.c | 2 +- > arch/riscv/mm/ptdump.c | 67 +++++++++++++++++++----- > 15 files changed, 258 insertions(+), 50 deletions(-) > create mode 100644 Documentation/riscv/vm-layout.rst This generally looks good, but I'm getting a bunch of checkpatch warnings= and=20 some conflicts, do you mind fixing those up (and including your other kas= an=20 patch, as that's likely to conflict)?