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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3ED08C433EF for ; Wed, 29 Sep 2021 14:59:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 28F20613A6 for ; Wed, 29 Sep 2021 14:59:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344928AbhI2PBa (ORCPT ); Wed, 29 Sep 2021 11:01:30 -0400 Received: from smtp-relay-internal-1.canonical.com ([185.125.188.123]:54770 "EHLO smtp-relay-internal-1.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344920AbhI2PB1 (ORCPT ); Wed, 29 Sep 2021 11:01:27 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id B16E440264 for ; Wed, 29 Sep 2021 14:59:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1632927585; bh=3cu0sC+0/nYKnIJicRvpKscpuwOhF+7jr6vCCwWJtCY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=UbQk0DZVWmXt0WTDHbR7rTh79aIJDo8e2I4bI8rBymq0KqxjoHVH/ZXVmMCYApfZM s+15BFrfwVYB+CMMu9Bph2x4VhXxfwM8dncoaLGL6XTKvWKW/pEK5SrLfIZZKGVZhb mayHeLo9k0IjgNJ4bl2QEJupdJ/EaefqflhOQeLZDTdx9GxZEXQKQpXCTlaJiXTSmw TzzWg2Y5Fju/8a+wjjgp9j+y56rZFP4buRu+IHOArKBWchXh2+FiVgpFPM4Z3qhVYX ChlbPvXUO7vy+WXctQyUe8bRToAeGLZi/hG8w0Ml/e9KgzgRHpQF7fbhrcmfM3Vg7X N4WtiOtE/A8ag== Received: by mail-wm1-f71.google.com with SMTP id 70-20020a1c0149000000b0030b7dd84d81so1350393wmb.3 for ; Wed, 29 Sep 2021 07:59:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3cu0sC+0/nYKnIJicRvpKscpuwOhF+7jr6vCCwWJtCY=; b=aunQ+J+XTbOEM/wvK7XcjdLRq89/zNmEkoZYe9PBFu3GfMNwGiHd1RnQhbCLhSNUhn PszolAAVTlZ74I0lu6kRsb+WaJfKZRzKfFfesNWtFJb8akbsbZtImZdrbJoqlxJu2t95 /qEnazpc+DQYNcYLca4hu2ofSM7DlFJI2Ia5s99wiARDJlGM3wCX5cXlbCBeFk8CKi+R ogPRyOPxcrsXVF7qszeuym15H1NjVJw+6WlY7I1SvBvodH8Kz1vQVkTTJFJ6dLvPPOak Al0NqFZllFjBjfoSuiilKRWuYf07jkeRmni1F1Z+ZxBLHnk85k63XRxrySilUg8FPmCP AI2Q== X-Gm-Message-State: AOAM532i6DIaDnBFhFoCWGLRbL8kaTOIJY0e1RXiiX4TFHbOHc2/+FUo y7tJWI59VQwoXnOvV5ruTAaie6SprPmwm3GW1cjhI4jAYPyVqX0tdvrg0KPu3+lMjBBELZ3Ikvw TF+gb4QEk/MECkfDnmvuZCN3VlCF0pJe413pz4JvKbA== X-Received: by 2002:a5d:6d81:: with SMTP id l1mr340920wrs.404.1632927585416; Wed, 29 Sep 2021 07:59:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz15onekdEY2IjZrEU//1FAWV4fNkSUiHcnuIembEtiBE3MlubprxTIgEM4Jdpb37mujcxXYQ== X-Received: by 2002:a5d:6d81:: with SMTP id l1mr340890wrs.404.1632927585227; Wed, 29 Sep 2021 07:59:45 -0700 (PDT) Received: from alex.home (lfbn-lyo-1-470-249.w2-7.abo.wanadoo.fr. [2.7.60.249]) by smtp.gmail.com with ESMTPSA id l16sm81418wmj.33.2021.09.29.07.59.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 07:59:44 -0700 (PDT) From: Alexandre Ghiti To: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Zong Li , Anup Patel , Atish Patra , Christoph Hellwig , Andrey Ryabinin , Alexander Potapenko , Andrey Konovalov , Dmitry Vyukov , Ard Biesheuvel , Arnd Bergmann , Kees Cook , Guo Ren , Heinrich Schuchardt , Mayuresh Chitale , linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-efi@vger.kernel.org, linux-arch@vger.kernel.org Cc: Alexandre Ghiti Subject: [PATCH v2 08/10] Documentation: riscv: Add sv48 description to VM layout Date: Wed, 29 Sep 2021 16:51:11 +0200 Message-Id: <20210929145113.1935778-9-alexandre.ghiti@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210929145113.1935778-1-alexandre.ghiti@canonical.com> References: <20210929145113.1935778-1-alexandre.ghiti@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sv48 was just introduced, so add its virtual memory layout to the documentation. Signed-off-by: Alexandre Ghiti --- 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 b7f98930d38d..f10128e0a95f 100644 --- a/Documentation/riscv/vm-layout.rst +++ b/Documentation/riscv/vm-layout.rst @@ -61,3 +61,39 @@ RISC-V Linux Kernel SV39 ffffffff00000000 | -4 GB | ffffffff7fffffff | 2 GB | modules, BPF ffffffff80000000 | -2 GB | ffffffffffffffff | 2 GB | kernel __________________|____________|__________________|_________|____________________________________________________________ + + +RISC-V Linux Kernel SV48 +------------------------ + +:: + + ======================================================================================================================== + Start addr | Offset | End addr | Size | VM area description + ======================================================================================================================== + | | | | + 0000000000000000 | 0 | 00007fffffffffff | 128 TB | user-space virtual memory, different per mm + __________________|____________|__________________|_________|___________________________________________________________ + | | | | + 0000800000000000 | +128 TB | ffff7fffffffffff | ~16M TB | ... huge, almost 64 bits wide hole of non-canonical + | | | | virtual memory addresses up to the -128 TB + | | | | starting offset of kernel mappings. + __________________|____________|__________________|_________|___________________________________________________________ + | + | Kernel-space virtual memory, shared between all processes: + ____________________________________________________________|___________________________________________________________ + | | | | + ffff800000000000 | -128 TB | ffff8fffffffffff | 16 TB | kasan + ffff9dfffee00000 | -94 TB | ffff9dfffeffffff | 2 MB | fixmap + ffff9dffff000000 | -94 TB | ffff9dffffffffff | 16 MB | PCI io + ffff9e0000000000 | -94 TB | ffff9fffffffffff | 2 TB | vmemmap + ffffa00000000000 | -92 TB | ffffbfffffffffff | 32 TB | vmalloc/ioremap space + ffffc00000000000 | -64 TB | fffffffeffffffff | 64 TB | direct mapping of all physical memory + __________________|____________|__________________|_________|____________________________________________________________ + | + | 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 + __________________|____________|__________________|_________|____________________________________________________________ -- 2.30.2