From: Ard Biesheuvel <ardb+git@google.com>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Ryan Roberts <ryan.roberts@arm.com>,
Anshuman Khandual <anshuman.khandual@arm.com>,
Kees Cook <keescook@chromium.org>
Subject: [RFC PATCH 6/8] arm64/Kconfig: Drop support for 48-bit virtual addressing
Date: Wed, 30 Oct 2024 11:18:10 +0100 [thread overview]
Message-ID: <20241030101803.2037606-16-ardb+git@google.com> (raw)
In-Reply-To: <20241030101803.2037606-10-ardb+git@google.com>
From: Ard Biesheuvel <ardb@kernel.org>
Drop support for 48-bit virtual addressing on 16k pages, which is the
only remaining config that supports this explicitly.
On 16k pages, 48-bit virtual addressing uses 4 levels of translation,
where the top level has only 2 entries. This is very inefficient in
terms of TLB utilization, and so 47-bit virtual addressing is usually a
better choice.
Note that x86 supports only 47-bit virtual addressing for user space
with 4 translation levels, due to the way its page tables are
constructed (a single combined root table for both kernel and user
space), and so removing this configuration is unlikely to create
portability concerns.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
arch/arm64/Kconfig | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 7df7d24c767d..39d0d2eb5b7c 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -410,12 +410,12 @@ config BUILTIN_RETURN_ADDRESS_STRIPS_PAC
config KASAN_SHADOW_OFFSET
hex
depends on KASAN_GENERIC || KASAN_SW_TAGS
- default 0xdfff800000000000 if (ARM64_VA_BITS_48 || (ARM64_VA_BITS_52 && !ARM64_16K_PAGES)) && !KASAN_SW_TAGS
+ default 0xdfff800000000000 if ARM64_VA_BITS_52 && !ARM64_16K_PAGES && !KASAN_SW_TAGS
default 0xdfffc00000000000 if ARM64_VA_BITS_52 && ARM64_16K_PAGES && !KASAN_SW_TAGS
default 0xdffffe0000000000 if ARM64_VA_BITS_42 && !KASAN_SW_TAGS
default 0xdfffffc000000000 if ARM64_VA_BITS_39 && !KASAN_SW_TAGS
default 0xdffffff800000000 if ARM64_VA_BITS_36 && !KASAN_SW_TAGS
- default 0xefff800000000000 if (ARM64_VA_BITS_48 || (ARM64_VA_BITS_52 && !ARM64_16K_PAGES)) && KASAN_SW_TAGS
+ default 0xefff800000000000 if ARM64_VA_BITS_52 && !ARM64_16K_PAGES && KASAN_SW_TAGS
default 0xefffc00000000000 if ARM64_VA_BITS_52 && ARM64_16K_PAGES && KASAN_SW_TAGS
default 0xeffffe0000000000 if ARM64_VA_BITS_42 && KASAN_SW_TAGS
default 0xefffffc000000000 if ARM64_VA_BITS_39 && KASAN_SW_TAGS
@@ -1353,10 +1353,6 @@ config ARM64_VA_BITS_42
bool "42-bit"
depends on PAGE_SIZE_64KB
-config ARM64_VA_BITS_48
- bool "48-bit"
- depends on PAGE_SIZE_16KB
-
config ARM64_VA_BITS_52
bool "52-bit"
help
@@ -1392,7 +1388,6 @@ config ARM64_VA_BITS
default 36 if ARM64_VA_BITS_36
default 39 if ARM64_VA_BITS_39
default 42 if ARM64_VA_BITS_42
- default 48 if ARM64_VA_BITS_48
default 52 if ARM64_VA_BITS_52
choice
--
2.47.0.163.g1226f6d8fa-goog
next prev parent reply other threads:[~2024-10-30 10:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 10:18 [RFC PATCH 0/8] arm64: Simplify VA space configurations Ard Biesheuvel
2024-10-30 10:18 ` [RFC PATCH 1/8] arm64: Kconfig: force ARM64_PAN=y when enabling TTBR0 sw PAN Ard Biesheuvel
2024-10-30 10:18 ` [RFC PATCH 2/8] arm64: Kconfig: fix ARCH_MMAP_RND_BITS_MAX for 52-bit virtual addressing Ard Biesheuvel
2024-10-30 10:18 ` [RFC PATCH 3/8] arm64: Kconfig: eliminate 64k/48-bit VA combination Ard Biesheuvel
2024-10-30 10:18 ` [RFC PATCH 4/8] arm64: Kconfig: eliminate 4k/48-bit " Ard Biesheuvel
2024-10-30 10:18 ` [RFC PATCH 5/8] arm64/Kconfig: Drop support for 47-bit virtual addressing Ard Biesheuvel
2024-10-30 10:18 ` Ard Biesheuvel [this message]
2024-10-30 10:18 ` [RFC PATCH 7/8] arm64/mm: Use reduced VA sizes (36/39/42 bits) only for user space Ard Biesheuvel
2024-10-30 12:44 ` Marc Zyngier
2024-10-30 13:25 ` Ard Biesheuvel
2024-10-30 10:18 ` [RFC PATCH 8/8] arm64/mm: Account for reduced VA sizes in T0SZ and skip the levels Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241030101803.2037606-16-ardb+git@google.com \
--to=ardb+git@google.com \
--cc=anshuman.khandual@arm.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=maz@kernel.org \
--cc=ryan.roberts@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.