diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2025-05-04 12:52:32 +0300 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-05-04 16:27:23 +0300 |
commit | b3464a36f7f2499d517e8334e07ddd6eefcd67c1 (patch) | |
tree | e5d1cdb020d57ab1417d1058bfa8152349263dbc | |
parent | bd4a58beaaf1f4aff025282c6e8b130bdb4a29e4 (diff) | |
download | linux-b3464a36f7f2499d517e8334e07ddd6eefcd67c1.tar.xz |
x86/boot: Disregard __supported_pte_mask in __startup_64()
__supported_pte_mask is statically initialized to U64_MAX and never
assigned until long after the startup code executes that creates the
initial page tables. So applying the mask is unnecessary, and can be
avoided.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: David Woodhouse <dwmw@amazon.co.uk>
Cc: Dionna Amalie Glaze <dionnaglaze@google.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Kevin Loughlin <kevinloughlin@google.com>
Cc: Len Brown <len.brown@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: linux-efi@vger.kernel.org
Link: https://lore.kernel.org/r/20250504095230.2932860-27-ardb+git@google.com
-rw-r--r-- | arch/x86/boot/startup/map_kernel.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/x86/boot/startup/map_kernel.c b/arch/x86/boot/startup/map_kernel.c index 0eac3f17dbd3..099ae2559336 100644 --- a/arch/x86/boot/startup/map_kernel.c +++ b/arch/x86/boot/startup/map_kernel.c @@ -179,8 +179,6 @@ unsigned long __head __startup_64(unsigned long p2v_offset, pud[(i + 1) % PTRS_PER_PUD] = (pudval_t)pmd + pgtable_flags; pmd_entry = __PAGE_KERNEL_LARGE_EXEC & ~_PAGE_GLOBAL; - /* Filter out unsupported __PAGE_KERNEL_* bits: */ - pmd_entry &= __supported_pte_mask; pmd_entry += sme_get_me_mask(); pmd_entry += physaddr; |