Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp825325pxb; Wed, 29 Sep 2021 10:24:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFkTowN9WslnHwXYynUTj7CvZ2GfCfC7hLAA7+qA9a1wJhrBw96YHRbkhi6F3rgUkMwvfL X-Received: by 2002:a17:906:707:: with SMTP id y7mr1121348ejb.148.1632936287375; Wed, 29 Sep 2021 10:24:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632936287; cv=none; d=google.com; s=arc-20160816; b=Eiz+fNsfK4oTa9eR+GT66WoAH99ZkcUTLtZhZyWuNsiCE0hVYmKgOaTmIXBCpfNRjx pjYy+J7uMos5g0ywM9l2gA+ly5mRZ3gFmj+jo7q5Z5z/cURfmE1AoqU14hH5HesWdFqs zQxEKzd9W0xB5YX5y1v6NppCOoPsyPOmUVo94re0UT60UuJl+WNPANlpK6uq9t4co81B Wy8wGIHaS0S2XalISn4DaXf5k8kwS1TsCCiLqOaBzIQ3wKb97+oGXQigtnEP8oP9/DbI ul/WiTITZFOVOVRLsvMRMwQ/BzdTe8au3K6C4MbhOmWjWdB+24cLKIW3+QuQgNHAnzvB k/2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3cu0sC+0/nYKnIJicRvpKscpuwOhF+7jr6vCCwWJtCY=; b=azJj1IWsSF9wtjNJRD9+ZN8I6VC/0rLDlS1CJhUhw1Jj1Qng/hDjpbrePl/Jegh5bx BFvRJ0QROowBepshrtxLHlMhai2U+jTeraK09OhveE/SM0PJHUfawrQf09fcvNpSHuS8 5+r+5lLUDp0iohStt/oXzHVf/OR41Ry1EcrlzBatREuGMAxQ5S+HvA2QitjBsuNV7JC8 yDuNmdg5UuVLnjgMiH9Wj7Oy2RSB3RDl2aKPd5HSxSBdthEj1mXOd0lXTCtPzZnzvuby rGY6F59LpLRkfbTIz5JYNRxxDT74OPRkm3+kgShxmGGOzCQhg/roIK+c5xZ200GoYfUk qeFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=UbQk0DZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 25si457242ejh.607.2021.09.29.10.24.20; Wed, 29 Sep 2021 10:24:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=UbQk0DZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344924AbhI2PB3 (ORCPT + 99 others); Wed, 29 Sep 2021 11:01:29 -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-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