summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/pgtable_64_types.h
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2024-02-27 18:19:10 +0300
committerBorislav Petkov (AMD) <bp@alien8.de>2024-03-04 20:12:06 +0300
commit63bed96604205fa0b23c91d268df5f1f1b26faf6 (patch)
treef4b4bd2f7a30c419b63c2d8f775876516d3b2680 /arch/x86/include/asm/pgtable_64_types.h
parentdada8587068c820ba5e5d09b9c32d8bc28c4dbe6 (diff)
downloadlinux-63bed96604205fa0b23c91d268df5f1f1b26faf6.tar.xz
x86/startup_64: Defer assignment of 5-level paging global variables
Assigning the 5-level paging related global variables from the earliest C code using explicit references that use the 1:1 translation of memory is unnecessary, as the startup code itself does not rely on them to create the initial page tables, and this is all it should be doing. So defer these assignments to the primary C entry code that executes via the ordinary kernel virtual mapping. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Tested-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/r/20240227151907.387873-13-ardb+git@google.com
Diffstat (limited to 'arch/x86/include/asm/pgtable_64_types.h')
-rw-r--r--arch/x86/include/asm/pgtable_64_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/pgtable_64_types.h b/arch/x86/include/asm/pgtable_64_types.h
index 38b54b992f32..9053dfe9fa03 100644
--- a/arch/x86/include/asm/pgtable_64_types.h
+++ b/arch/x86/include/asm/pgtable_64_types.h
@@ -21,9 +21,9 @@ typedef unsigned long pgprotval_t;
typedef struct { pteval_t pte; } pte_t;
typedef struct { pmdval_t pmd; } pmd_t;
-#ifdef CONFIG_X86_5LEVEL
extern unsigned int __pgtable_l5_enabled;
+#ifdef CONFIG_X86_5LEVEL
#ifdef USE_EARLY_PGTABLE_L5
/*
* cpu_feature_enabled() is not available in early boot code.