From patchwork Fri Nov 18 17:15:56 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: 13048522 X-Patchwork-Delegate: palmer@dabbelt.com 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 8F006C433FE for ; Fri, 18 Nov 2022 17:16:28 +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=BU6GuGub6epMKtyWcooCPN1JULwwCU02zRBGtvsR2m0=; b=GATe2oET6Uy1jr NMrLIAm9IZ/2yBnfn3Gcl+x/6dCYpSl5Fpz8r/Njk+RnqLUVLKptBs8MLxFaT59BWxmMK9Lk60XIx XtaCpoE/e4Qrdd81YJzoH2WSu1IhmCVKgY8tH5rq9gEnTUwT6AF3sa/d4YRUFhboZwM8uCfUF3qhr 26wJaPnllU3cBwDghXVX73vtzUE4Ld4/ZqwahkMmzeg8iooRlYGwuqYVloCEpgw+u/p0q3vEQ/0ps NPvW1ADkVCQy2sLaby1GKm8LCMTHhZhAXHhQ5PjHITPHKUXB0s/Tsnd4CDh46vbqMuMKiWSPPeC2P IZLtDtLxciZV0dCwKFmQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow4yR-005hwP-UO; Fri, 18 Nov 2022 17:16:19 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ow4yO-005ht0-Oy for linux-riscv@lists.infradead.org; Fri, 18 Nov 2022 17:16:18 +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 ams.source.kernel.org (Postfix) with ESMTPS id 2A4E4B824D5; Fri, 18 Nov 2022 17:16:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42D29C433B5; Fri, 18 Nov 2022 17:16:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668791771; bh=5YPCMtSudsRWbegWUYgcmmhxe/oN7JAwlQaeo32XQ2E=; h=From:To:Cc:Subject:Date:From; b=Hvr0aRSi5Ym/Vx37FB8oFTXjD3VJVmDw/+Ty65nQblavVuPbV2kvWda0oNqdYYPP7 GuA0j0/8JaDpkc2aCnc0X5Qod0GA0BlZaklZUGWyKs0o4FhJNZAxFqX6RNrMt6QcMv gmOtGU35th8XhGywEKpja4AH8SCFQfBtduXQhSNyr438jpT1ZbSMrR0YoWogslAcYo OOG3BaWhf5O1TpHAc7j33Tq8fuIHQ0QCWEkRTTPzE03umtwfEhy50l8uZlsDbHrI9o oM5mEzYcne1LvEBiwU32MkmI5bD94zyNzg7DQQV1VnOx/LIblDS1B9tzV6lMvHa6Zm Zch6LUjrowEBg== 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 v2] Documentation: riscv: Document the sv57 VM layout Date: Fri, 18 Nov 2022 18:15:56 +0100 Message-Id: <20221118171556.1612190-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-20221118_091617_213486_C1E5D125 X-CRM114-Status: GOOD ( 11.21 ) 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 Reviewed-by: Alexandre Ghiti --- v2: * Cosmestics (Alex) * Corrected kasan address (Alex) --- 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..3be44e74ec5d 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 | ffdeffffffffffff | 32 PB | direct mapping of all physical memory + ffdf000000000000 | -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 + __________________|____________|__________________|_________|____________________________________________________________