From patchwork Mon Oct 31 18:02:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= X-Patchwork-Id: 13026237 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id AD03CECAAA1 for ; Mon, 31 Oct 2022 18:03:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=KFsgRlSzeiOduH5pv/j9vxf18HBwMexzGr/Rk98dsH8=; b=35L8pQbNHWfCsw 3fOKyaBi97+hUDlOR5c+2ZLP4PqrnCPvU0pudu/h8kGSTyoDj+2+TWbiCo+yvVXMJSlhrIIQU2stb N58zs51s+mZY58CRtojh1ci8qEGEB/pNt/xQFu3BtwgOu73jGOLQihsFCvIF7ACAdnfLuvaYAkJBp CTa/5CwfnQWj6UCWdzc1mheVqUlV8ZGufkXexAPLLpBO7EBlQ6MiCHBtFO3ozqKg7sRiuDX7TfGP2 thifL6Ub8wUhB7jq2ca5l2nTWCXMbXbhfaRh75UA05raQlW5DNyU8EWzVRKD7WrpuMkLdWJUtp+eJ fHPmDlF8g3c+PwHIHBlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1opZ80-00DaWS-HD; Mon, 31 Oct 2022 18:03:16 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1opZ7x-00DaVE-B6 for linux-riscv@lists.infradead.org; Mon, 31 Oct 2022 18:03:14 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 519C9612B9; Mon, 31 Oct 2022 18:03:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E8D7C433D6; Mon, 31 Oct 2022 18:03:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667239392; bh=6hLhv+fhob8SuiCdW0Sjii1D67SU+WLSGSUTJSSJMmQ=; h=From:To:Cc:Subject:Date:From; b=gHXlioRqoYUBBQqA7T0h2aYS98UB6xYj7IvAk+yDmLFQF7FXS8MRG/AQYw8c2PT9o LgYCBXrBJNximFnSiOhvkYFq9Bhm13T84nAMK1E83Rco0SgaPTyFEkhQJQPuR2Dnct qJHWpji2JezektP3mBJv8grR7Dy7Cd13c6NaAo1EZ8suBrOe5+Qqq13ByIHEJTEzBb hwKMtqvp5dONsMq6xmgxRFi74nwdS3MVitCYmUEbAG/7vYWOFIDkRbsmoMuTX7RYjw gIwjuSVI5pOSln/DZtFYdt4R3kBAJXKEkKMh7YrXEcVz5DX5rUm8fLa44bc+5BX50g P1oes82KhzntA== From: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= To: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-riscv@lists.infradead.org, Alexandre Ghiti Cc: =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Jonathan Corbet , linux-doc@vger.kernel.org Subject: [PATCH] Documentation: riscv: Document the sv57 VM layout Date: Mon, 31 Oct 2022 19:02:30 +0100 Message-Id: <20221031180230.1420544-1-bjorn@kernel.org> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221031_110313_501104_4669F63C X-CRM114-Status: GOOD ( 11.16 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Björn Töpel RISC-V has been supporting the "sv57" address translation mode for a while, but is has not been added to the VM layout documentation. Let us fix that. Signed-off-by: Björn Töpel --- Documentation/riscv/vm-layout.rst | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/Documentation/riscv/vm-layout.rst b/Documentation/riscv/vm-layout.rst index 5b36e45fef60..35f76798b6e4 100644 --- a/Documentation/riscv/vm-layout.rst +++ b/Documentation/riscv/vm-layout.rst @@ -97,3 +97,39 @@ RISC-V Linux Kernel SV48 ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules, BPF ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel __________________|____________|__________________|_________|____________________________________________________________ + + +RISC-V Linux Kernel SV57 +------------------------ + +:: + + ======================================================================================================================== + Start addr | Offset | End addr | Size | VM area description + ======================================================================================================================== + | | | | + 0000000000000000 | 0 | 00ffffffffffffff | 64 PB | user-space virtual memory, different per mm + __________________|____________|__________________|_________|___________________________________________________________ + | | | | + 0100000000000000 | +64 PB | feffffffffffffff | ~16K PB | ... huge, almost 64 bits wide hole of non-canonical + | | | | virtual memory addresses up to the -64 PB + | | | | starting offset of kernel mappings. + __________________|____________|__________________|_________|___________________________________________________________ + | + | Kernel-space virtual memory, shared between all processes: + ____________________________________________________________|___________________________________________________________ + | | | | + ff1bfffffee00000 | -57 PB | ff1bfffffeffffff | 2 MB | fixmap + ff1bffffff000000 | -57 PB | ff1bffffffffffff | 16 MB | PCI io + ff1c000000000000 | -57 PB | ff1fffffffffffff | 1 PB | vmemmap + ff20000000000000 | -56 PB | ff5fffffffffffff | 16 PB | vmalloc/ioremap space + ff60000000000000 | -40 PB | ffdffffeffffffff | 32 PB | direct mapping of all physical memory + ffdfffff00000000 | - 8 PB | fffffffeffffffff | 8 PB | kasan + __________________|____________|__________________|_________|____________________________________________________________ + | + | Identical layout to the 39-bit one from here on: + ____________________________________________________________|____________________________________________________________ + | | | | + ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules, BPF + ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel + __________________|____________|__________________|_________|____________________________________________________________