From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F2537606A320 for ; Tue, 1 Dec 2026 01:52:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=zF5+V9d4 Received: by kanga.kvack.org (Postfix) id AD22F6B00EF; Mon, 30 Nov 2026 20:52:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A5C526B05B1; Mon, 30 Nov 2026 20:52:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FDFC6B05B2; Mon, 30 Nov 2026 20:52:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 634CB6B00EF for ; Mon, 30 Nov 2026 20:52:47 -0500 (EST) Received: from smtpin06.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay02.hostedemail.com (Postfix) with ESMTP id C020D1207C5 for ; Tue, 1 Dec 2026 01:52:46 +0000 (UTC) X-FDA: 85493740332.06.5DD1927 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by imf20.hostedemail.com (Postfix) with ESMTP id F3DD01C0008 for ; Tue, 1 Dec 2026 01:52:44 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20260707 header.b=zF5+V9d4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf20.hostedemail.com: domain of ericcurtin17@gmail.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=ericcurtin17@gmail.com ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796089965; b=5HXPOo0esjHlYdlax/xMkilX48NfILFg0YhftbaKW/ZmBd0bUYEk4tWMUEldA4MRYIcGvj 4vQwoHqmYOvSKER4gYLAvW8DLqAlDv663/9ac9jRjmnf4STocJqr80I4jsVNCKTjnMjt/o njNDwc4wTlRiNFKq5zHSDda5y1kNpgU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796089965; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=iC1RNAsTi86xRlCA/iV6XGBcki5hyqoMB82WvI4AHpo=; b=8DFVE7noLhAouBN7dxF4wHLP38gFs8XWO/B9dG0eyJiWw7IDLOj54Hirk1Q6hjAw3roCeu /ewBHcQs9nHaBFfzsn/p31PcsTvS+t+2VuFOJA9wxCLetPR6t3/3AWKNVoIEkrfRI0kq/Z MnlWaqnoxenRXgFHpIvMZ5ipwnFQNCA= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=gmail.com header.s=20260707 header.b=zF5+V9d4; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf20.hostedemail.com: domain of ericcurtin17@gmail.com designates 209.85.128.53 as permitted sender) smtp.mailfrom=ericcurtin17@gmail.com Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4bb61185057so70918025e9.1 for ; Mon, 30 Nov 2026 17:52:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796089963; x=1796694763; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=iC1RNAsTi86xRlCA/iV6XGBcki5hyqoMB82WvI4AHpo=; b=zF5+V9d4aO/Zwa0IYXwESEirv8vwW8clmwuu/WUHviqWiLbDVgNFO5kpVn2l4S1uFe kR3AmBCtfMTNBgcQtjC8FOzzjs0I/JnO9uUuY774rGaBOIeRSBABK+u2L+akB+DFubUQ 8so4LzamvYtgGNi/mqiSyE8alRzdvq/mAsNDSASS9E9tGxbqmNwRKDMQfv5mCSIv6z6K 0FPpZkJ+YFOaC8v+CMknL3Aw70cvH9rs5hWnjdmunxW2uUHO8KTuDvBcJV2IHxd1HjQV eWtSxqItZJkztQoarBcuKV6uPi52M6rX4n/VGdMpJMqi7zfPENRfI5tPEwrOiycjff4q VFhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796089963; x=1796694763; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=iC1RNAsTi86xRlCA/iV6XGBcki5hyqoMB82WvI4AHpo=; b=ZQ8JcdGGS5D1lhmjLkDCMSlmZkSOEpqIKVd4lVOwlMla1MRhk8QJvQTFJ48dH9AlYk ak8orBFOXpb/7VYbLnZMWLz/dSvLPSOVU/uvfbeBFQ2WNVsaGVzRjv1V+wbph+MPuk8h tDksc1Szs9rUDuUNANaDoc/epN3CJdUqNgykIEWz91yO8W5m+Sn5LpGZ4LXnO7smhn/a hxKd9Rh3HfO2B6D6CxE1L3mXmqYMv6M7PD+cePq886IZJVyIJ5Q7h92sF+0N1gln/ypT TKs3rKbf7EGXc3GIb/68Y142R5vqW832q/boIVNKjInG47l8Ch236TFquypx8evoFcTD Kvdg== X-Forwarded-Encrypted: i=1; AL+hErHpY96l3KBBupL7/jjkIMQBPiDmwj7PlBJkFmmuUCZEX/OV7bhy4vuaEPBcxsBPURS1oLCUbYsopg==@kvack.org X-Gm-Message-State: APuU4Z868zYHh+hfcNV1xO3ynDl/4xIEutCbR7GXdh6eNX/gbRQdBpWe R2gTm6hbhiYgmYuI1kRuxlFxGDwmHI7uD6MxpGSFqD86dV5fPP+i9Nmg X-Gm-Gg: AZFdTZegepLJnYwmuDxBJHGlrhwHdGH+y3nNPpKLGWUzCbtnoHVaRKtzngnWrF1ztV4 kGsElv5WtwK54+9GLt8Fo98biu17P48OTl3wFvnfsj3BTWNl2v7PnEVNnEMlQalHZ5OJh0ELEut T8ifh1Stjgj34xvfEn2uQhMjwOvBZiEkK1u/9DLhywQT1urO1CpHwTGRYFk8PN1RSGqwEkxlc/G G1WGOyJvSVqayeeL+pxWL/kbGH3iqE7wuFN44qDqdtOV6PU++RnnVdaRkfL8ZJGFF2ox5rLteBi hetGmNQMiHC7TfdmkCgxZVaOHcDjsfulNd45PS2w7V5y2R5JxqIYenCeHtjsMpp2fM/Jbo2ugse b0d2qOoZCgVV/2JqoA8HxGxz9+M2UOx94KF0leNw7VmxhBhqDe5YK1bB7XER0i9O5+XEYve4pE1 d+o7BUJzgP3Pb6abKC40BVMfX59oEi8WyuR0+cXgaPZAw+gzKFGJ6GXxyrrKODE4+5MFaLT9D/p tdvYW2T1m1qjfZAjrgUNkRhzOzTn2vh005FX+ULZnZz9OO/pixW4CRa5MDpBOgU6KQgtOfu93Vr bkNN1BaDCVTl8xNuvfCFMpBjg5eTSDT48WcPAQ== X-Received: by 2002:a05:600c:a087:b0:4a2:5267:3cd4 with SMTP id 5b1f17b1804b1-4bb887c9fbamr742460255e9.3.1796089963155; Mon, 30 Nov 2026 17:52:43 -0800 (PST) Received: from NULL.Home.net ([2001:8a0:7280:4000:12d:c3b9:cecc:8966]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4bb884911e3sm1199037055e9.6.2026.11.30.17.52.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2026 17:52:42 -0800 (PST) From: Eric Curtin To: linux-arm-kernel@lists.infradead.org Cc: Eric Curtin , Ryan Roberts , Andrew Morton , Anshuman Khandual , Ard Biesheuvel , Catalin Marinas , David Hildenbrand , Greg Marsden , Ivan Ivanov , Kalesh Singh , Marc Zyngier , Mark Rutland , Matthias Brugger , Miroslav Benes , Will Deacon , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Guo Ren , linux-riscv@lists.infradead.org, bpf@vger.kernel.org, linux-csky@vger.kernel.org Subject: [RFC PATCH v2 00/43] Boot-time page size selection for arm64 (core) Date: Tue, 1 Dec 2026 01:51:32 +0000 Message-ID: <20261201015240.1017259-1-ericcurtin17@gmail.com> X-Mailer: git-send-email 2.56.1 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: F3DD01C0008 X-Stat-Signature: 1zkzuse15moo7hi5tc5tihjpma3514gh X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_PASS,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Rspam-User: X-Rspamd-Server: rspam04 X-HE-Tag: 1796089964-324745 X-HE-Meta: U2FsdGVkX1/47bYfeCHDnw4WH372MIQzeXg/gvLdLC7QYqrObJub41c3y+DWRCG30U1ju9ACEgcRWL7bD1jMTrg3AQa8YPSF9kZt10L8IJyUZ/Fk3eaVQZZwPQneJjLHIOUmY/sTqu2MD16Y3JWNqiBOgXvjZ84hngRprfzkr2mhNMQBHf06WPctp1tsS/EoliRi4LV1HkF7nkeGVRw7zcN9mLFvC8cIXdTa9HCHI6jHjkm5iTzlImua/Y2Ylk8SzoCaQU81KPOOGgDF2ZeMJaIA7RyCn0ipDagGBelnjjrnSfHkP/S5446ZcbTPCcJkULzPrW5U9pOeqtRsXkYeeoJtQu7SLyUdNI5Wl0SWbNZGI200Y1i+A0bttN+IZKyFWxeo3ukJVHpMPQPXGnY59QrVMrnoCEhMOHTCYMN/4A5oP+ppYQOjikZkf2AbW4LCDUUr7Bgz1h7wZGCM8dd46UCn6VS0fc/kFFgrlRGD5VJ7iXfEnsAaeZEKdlZKCbynWJWqPh+EyZ9n0DAnYsTC3Hqzn0UXWPtgOWBgED7S2rRZ5rJ0tewP63o74JsWH3FEm1zth6/1bFiNEZQwz/uI2Ytw7bjX8N/JKZFsSPHXYzs8ijGTlIZmB8CPCW6tRVlYL+XZbHKa5lfuS7Gd7ZAU4+Sr+mlx9ay8Oy0GsnfWc+o/wXYQdfjaKAoVIcn1RKrIKHmVxD05wRmvuQhTqKcBG9mFt/owI9LHp3wkMwq638Kz+LfARxSjRmyfEffsp9NS27kwjbv9Q/6zUcoOWi6/ogxURlzqcnq6Zx0gn4ZXI2Ey1BCORAA3j6UJxL4g6umgNODxfa1gNYpbZLc06mP8lxH42G6g8Bv/OhvWPOg+A8JO83uPS/0PFxJLW0UZShf52aTk1Xt5/kyGYhKSDWJi0FJg1H0ru27vdNUKdZ9PevxrUWDY9RRMyIVmh+Lz1VmTeWE5H26aBjfEyAlkw9p 3bhwjs9g J0syxQHj7W8A3Q7JKNcYR0G+RWALjyBxoUO2BHb0IenThOl7f5YnwMbRCmEMnudg2x45xpRkD8qhKrVnEycuqEhdc3S0EatY+CE7qtuQ291xYoC2jFb3xqtcnPcW7VY6vS5M413QL8lrZp5vMGeTLfj+bQK1x64uNrcszVHuizkwBwsDeUOmgSjiY+F5FtgyRZMovh49EWMa0c/5Nhy60mws9mkXyYIBUyWYI8/exagrP0gY3Ugp4qSzcXA7mqh6YYWhSafN90Mr1AeH5xS22+kwlNFZAuy1B0E3yi8MtlsJ0NlEbslhZOifL1vM4ACn2sjiAYvjT8jjRz25ciDwGt4MWeHv7p2lFGdRifACFXL9e2wqNqcGUIP7fOEjcTukEvfHrAedNDcR4IAWKmzeYNxrO4W105up9UO4OcJeTIAt7aTRLBcUnYFV84SikaD4JeJdONKsVARY+8/KMtQqaiN+wAgc1GE5Z9iXVkFdQtclLYTrIS6FIN6Aun547Mnbik8KIj6OGTvcRFPQGZPtBQPr6SkLxSQ40C7G/eK2swO6wp7t6/a6VRWIDXMVD8iOkZc1G95wG+ScWUXi5H5fyKbqpKnQ/didpifOjl1z2YyhW9bT+a7NVrL1fFH6oLbLETl5VVC3ozZl4zyAU087KpEyAH0KVgmyytXe1THMP0A+ldVeqpY/M3AHpecwMOcikJ8F766GTM/R1u0KRZHhNIwYrrqda/U8p1S242a02EbVzsF2pcI9lQdrKuFuZO0ban5ee/MiHmTmZAA+TfyJ9dvgg8nX4y+Yil/VRyshwPODTyrU= Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From: Eric Curtin This is a continuation of Ryan Roberts's boot-time page size selection series [1]. I have rebased it onto v7.4-rc5, folded in the feedback from the v1 thread and Ryan's v2 work-in-progress branches [2], and split it up as Ryan proposed. This posting is the core: the PAGE_SIZE_MIN/MAX infrastructure, the mm and kernel changes it needs and the arm64 implementation. The conversions of individual subsystems and drivers (fs, net, sound, drm, block, ...) follow as separate series to the relevant maintainers; they only depend on patch 1. Ryan, I hope you are happy for me to carry this forward; shout if you would rather post it yourself. arm64 supports 4K, 16K and 64K base pages, but the size is fixed at compile time, so distributions that want several sizes ship several kernels. With CONFIG_ARM64_BOOT_TIME_PAGE_SIZE=y the size is chosen at boot with arm64.pagesize=4k|16k|64k (default set by ARM64_BOOT_TIME_PAGE_SIZE_DEFAULT), and PAGE_SIZE, PAGE_SHIFT, PAGE_MASK and the pgtable geometry macros become __ro_after_init variables. Where a constant is unavoidable (static arrays, struct layouts, BUILD_BUG_ON(), case labels) code uses PAGE_SIZE_MIN/PAGE_SIZE_MAX. For fixed page size configurations these collapse to the old constants and the generated code is meant to be unchanged. Patches 1-13 are generic: the macros (patch 1), section alignment, page_frag, the split pmd lock, THREAD_SIZE and a few core users. Patches 14-33 and 40 are the arm64 plumbing, 34-39, 41 and 42 are further core conversions found while building, and patch 43 adds the Kconfig option and documentation last, so every patch builds with fixed page sizes. Changes since v1: - Rebased onto v7.4-rc5; picked up Ryan's v2-1-wip fixes and the review comments from the v1 thread. - Split into this core series plus per-subsystem series. - Fixed bugs found in an independent review of the whole series (KVM stage-2 mapping size on demotion, map_fdt() state, hibernate image buffers, module constructor ordering vs module_param, others). - Added -Werror=undef when the option is enabled. #if PAGE_SIZE ... otherwise silently evaluates the runtime variable as 0. - Added arm64.pagesize= documentation and a Kconfig default size. - Dropped patches that are already upstream. Testing: - arm64 defconfig with the option enabled builds and boots to userspace with 4K, 16K and 64K, under QEMU/KVM on an NVIDIA GB10 (DGX Spark), and with 4K and 16K under QEMU/HVF on an Apple M1. A small userspace test (fork/COW, mremap, mincore, memfd, THP, tmpfs and ext4-on-loop I/O) passes at each size; the kernel log is checked for warnings. - allmodconfig with the option enabled (KASAN off) builds cleanly with all the per-subsystem conversions applied. - defconfig builds with fixed 4K, 16K and 64K pages are unchanged, and this series alone builds at all three. - Not done: mm selftests, LTP, KASAN or LPA2 runs, and no new performance numbers; Ryan's v1 numbers [1] still stand as a guide. Most driver conversions are compile-tested only. Known limitations: 48-bit VA only, MMAP_RND_BITS, SECTION_SIZE_BITS and ARCH_FORCE_MAX_ORDER are sized for the worst case (64K) and the image carries the static buffers for the largest page size. The full tree, including the subsystem conversions, is at: https://github.com/ericcurtin/linux/tree/boot-time-page-size-v2 Tool use: the rebase conflict resolution, most of the build-fix conversions in the subsystem series, the review pass and the commit message drafting were done with an LLM coding assistant (opencode with Claude Sonnet), driven and tested as described above. Ryan's original patches keep his authorship and sign-off; I have not hand-reviewed every driver change, so please read them with that in mind. [1] https://lore.kernel.org/all/20241014105514.3206191-1-ryan.roberts@arm.com/ [2] https://gitlab.arm.com/linux-arm/linux-rr, features/boot-time-page-size-v2-1-wip Eric Curtin (9): mm: page_frag: Add _MIN/_MAX variants of PAGE_FRAG_CACHE_MAX_SIZE arm64: pi: Clear the FDT ptes on every remap in map_fdt() arm64: Convert remaining page-size switches to if/else vdso: Lay out the data pages in VDSO_PAGE_SIZE units mm: Use fixed sizes for shmem str_dup and swap cache PFN bits crash: Size the vmcoreinfo page array for the smallest page size arm64: Size kasan and pKVM stacktrace arrays for PAGE_SIZE_MAX exit: Use THREAD_SIZE_MAX for lowest_to_date tracing: Use PAGE_SIZE_MIN/MAX in the uprobe check and undefsyms page Ryan Roberts (34): mm: Add macros ahead of supporting boot-time page size selection vmlinux.lds: Align page-aligned sections to PAGE_SIZE_MAX mm: page_frag: Use PAGE_SIZE_MIN/MAX limits in page_frag_cache mm: Avoid split pmd ptl if pmd level is run-time folded mm/vmstat: Use THREAD_SIZE_MAX for the KSTACK_* counters fork: Permit boot-time THREAD_SIZE determination cgroup: Use DEFINE_GLOBAL_PAGE_SIZE_VAR for the kernfs_ops tables bpf: Do not embed page-aligned members in struct bpf_ringbuf PM: hibernate: Do not size swap structures to exactly PAGE_SIZE perf/core: Handle a boot-time PAGE_SIZE in format attrs and mlock KVM: Check struct kvm_run against PAGE_SIZE_MIN crash: Check crash_notes size against PAGE_SIZE_MIN arm64: Make INIT_DIR_SIZE and INIT_IDMAP_DIR_SIZE usable from C arm64: pi: Pass the early pgtable allocation limit to map_range() arm64: Introduce macros required for boot-time page size selection arm64: Parameterise early pgtable size macros by page shift arm64: Add arm64.pagesize= command line override arm64: pi: Select the page size at runtime during early boot arm64: Test PAGE_SIZE instead of CONFIG_ARM64_*K_PAGES arm64: Align image sections to PAGE_SIZE_MAX arm64: Map the trampoline rodata at its aligned offset arm64: fixmap: Size slots and page tables for PAGE_SIZE_MIN arm64: Size and align the zero page and FDT ptes for PAGE_SIZE_MAX arm64: Convert KVM and hugetlb size switches to if/else arm64: mm: Make page size dependent BUILD_BUG_ON() checks runtime arm64: cpufeature: Add capabilities for the page size in use arm64: Look up the page size at runtime in assembly code arm64: Support runtime folding of the pmd level arm64: Support runtime folding in idmap_kpti_install_ng_mappings arm64: Patch TRAMP_VALIAS into instructions at boot arm64: Determine THREAD_SIZE at boot time mm/damon/lru_sort: Initialise the stub access pattern at boot mm/zsmalloc: Size static limits for the worst-case page size arm64: Enable boot-time page size selection .../admin-guide/kernel-parameters.txt | 11 + Documentation/arch/arm64/booting.rst | 4 +- Documentation/arch/arm64/memory.rst | 21 ++ arch/alpha/include/asm/page.h | 1 + arch/arc/include/asm/page.h | 1 + arch/arm/include/asm/page.h | 1 + arch/arm64/Kconfig | 54 ++++- arch/arm64/Makefile | 5 + arch/arm64/include/asm/assembler.h | 78 ++++++- arch/arm64/include/asm/cpufeature.h | 44 +++- arch/arm64/include/asm/efi.h | 2 +- arch/arm64/include/asm/fixmap.h | 28 ++- arch/arm64/include/asm/hugetlb.h | 15 +- arch/arm64/include/asm/kernel-pgtable.h | 153 +++++++++---- arch/arm64/include/asm/kvm_arm.h | 23 +- arch/arm64/include/asm/kvm_hyp.h | 11 + arch/arm64/include/asm/kvm_pgtable.h | 6 +- arch/arm64/include/asm/linkage.h | 2 +- arch/arm64/include/asm/memory.h | 55 +++-- arch/arm64/include/asm/page-def.h | 9 + arch/arm64/include/asm/pgalloc.h | 15 +- arch/arm64/include/asm/pgtable-geometry.h | 46 ++++ arch/arm64/include/asm/pgtable-hwdef.h | 34 ++- arch/arm64/include/asm/pgtable-prot.h | 2 +- arch/arm64/include/asm/pgtable.h | 147 ++++++++---- arch/arm64/include/asm/processor.h | 10 +- arch/arm64/include/asm/sections.h | 1 + arch/arm64/include/asm/smp.h | 1 + arch/arm64/include/asm/sparsemem.h | 15 +- arch/arm64/include/asm/stacktrace/nvhe.h | 2 +- arch/arm64/include/asm/sysreg.h | 54 +++-- arch/arm64/include/asm/tlb.h | 3 + arch/arm64/kernel/asm-offsets.c | 2 +- arch/arm64/kernel/cpu_errata.c | 53 +++++ arch/arm64/kernel/cpufeature.c | 68 ++++-- arch/arm64/kernel/efi.c | 2 +- arch/arm64/kernel/entry.S | 48 +++- arch/arm64/kernel/head.S | 46 +++- arch/arm64/kernel/hibernate-asm.S | 6 +- arch/arm64/kernel/image-vars.h | 14 ++ arch/arm64/kernel/image.h | 4 + arch/arm64/kernel/pi/idreg-override.c | 50 +++- arch/arm64/kernel/pi/map_kernel.c | 186 +++++++++++---- arch/arm64/kernel/pi/map_range.c | 214 ++++++++++++++++-- arch/arm64/kernel/pi/pi.h | 68 +++++- arch/arm64/kernel/relocate_kernel.S | 10 +- arch/arm64/kernel/vdso-wrap.S | 4 +- arch/arm64/kernel/vdso.c | 4 +- arch/arm64/kernel/vdso32-wrap.S | 4 +- arch/arm64/kernel/vmlinux.lds.S | 56 ++--- arch/arm64/kvm/arm.c | 10 + arch/arm64/kvm/hyp/nvhe/Makefile | 1 + arch/arm64/kvm/hyp/nvhe/host.S | 12 + arch/arm64/kvm/hyp/nvhe/hyp.lds.S | 4 +- arch/arm64/kvm/hyp/nvhe/mm.c | 30 ++- arch/arm64/kvm/hyp/nvhe/pgtable-geometry.c | 16 ++ arch/arm64/kvm/hyp/nvhe/stacktrace.c | 3 +- arch/arm64/kvm/mmu.c | 31 +-- arch/arm64/lib/copy_page.S | 59 +++-- arch/arm64/lib/mte.S | 27 ++- arch/arm64/mm/Makefile | 1 + arch/arm64/mm/fault.c | 12 +- arch/arm64/mm/fixmap.c | 38 ++-- arch/arm64/mm/hugetlbpage.c | 55 ++--- arch/arm64/mm/init.c | 27 +-- arch/arm64/mm/kasan_init.c | 25 +- arch/arm64/mm/mmu.c | 126 +++++++++-- arch/arm64/mm/pgd.c | 12 +- arch/arm64/mm/pgtable-geometry.c | 32 +++ arch/arm64/mm/proc.S | 131 +++++++---- arch/arm64/mm/ptdump.c | 6 +- arch/arm64/tools/cpucaps | 3 + arch/csky/include/asm/page.h | 3 + arch/hexagon/include/asm/page.h | 2 + arch/loongarch/include/asm/page.h | 2 + arch/m68k/include/asm/page.h | 1 + arch/microblaze/include/asm/page.h | 1 + arch/mips/include/asm/page.h | 1 + arch/nios2/include/asm/page.h | 2 + arch/openrisc/include/asm/page.h | 1 + arch/parisc/include/asm/page.h | 1 + arch/powerpc/include/asm/page.h | 2 + arch/riscv/include/asm/page.h | 1 + arch/s390/include/asm/page.h | 1 + arch/sh/include/asm/page.h | 1 + arch/sparc/include/asm/page.h | 3 + arch/um/include/asm/page.h | 2 + arch/x86/include/asm/page_types.h | 2 + arch/xtensa/include/asm/page.h | 1 + drivers/firmware/efi/libstub/arm64.c | 3 +- drivers/irqchip/irq-gic-v3-its.c | 2 +- include/asm-generic/pgtable-geometry.h | 86 +++++++ include/asm-generic/vmlinux.lds.h | 44 ++-- include/linux/linkage.h | 4 +- include/linux/mm.h | 17 +- include/linux/mm_types.h | 2 +- include/linux/mm_types_task.h | 4 +- include/linux/page_frag_cache.h | 2 +- include/linux/percpu-defs.h | 4 +- include/linux/perf_event.h | 2 +- include/linux/pgtable.h | 2 +- include/linux/sched.h | 4 +- include/linux/thread_info.h | 10 +- include/linux/vm_event_item.h | 14 +- include/linux/vmcore_info.h | 1 + include/vdso/datapage.h | 10 +- include/vdso/page.h | 4 + init/main.c | 7 +- kernel/bpf/core.c | 11 +- kernel/bpf/ringbuf.c | 67 +++--- kernel/cgroup/cgroup.c | 8 +- kernel/crash_core.c | 4 +- kernel/events/core.c | 3 +- kernel/exit.c | 16 +- kernel/fork.c | 57 ++--- kernel/module/main.c | 4 +- kernel/power/power.h | 3 +- kernel/power/snapshot.c | 10 +- kernel/power/swap.c | 129 +++++++++-- kernel/trace/trace_uprobe.c | 2 +- kernel/trace/undefsyms_base.c | 3 +- lib/vdso/datastore.c | 34 +-- lib/vdso/gettimeofday.c | 4 +- mm/Kconfig | 8 + mm/damon/lru_sort.c | 4 +- mm/kasan/report.c | 3 +- mm/mm_init.c | 2 +- mm/page_frag_cache.c | 17 +- mm/shmem.c | 4 +- mm/swap.h | 7 +- mm/vmstat.c | 14 +- mm/zsmalloc.c | 18 +- virt/kvm/kvm_main.c | 2 +- 133 files changed, 2244 insertions(+), 793 deletions(-) create mode 100644 arch/arm64/include/asm/pgtable-geometry.h create mode 100644 arch/arm64/kvm/hyp/nvhe/pgtable-geometry.c create mode 100644 arch/arm64/mm/pgtable-geometry.c create mode 100644 include/asm-generic/pgtable-geometry.h base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244