diff options
author | Joerg Roedel <jroedel@suse.de> | 2021-12-02 16:32:23 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-12-04 13:50:08 +0100 |
commit | 9de4999050b5f2e847c84372c6a1aa1fe32bb269 (patch) | |
tree | 01ad4d85c3fbb7eb34f47c1b63a2feb2ce33fbcd | |
parent | e1cd82a339024beda8439fb2e20718363ee989a8 (diff) | |
download | linux-9de4999050b5f2e847c84372c6a1aa1fe32bb269.tar.gz linux-9de4999050b5f2e847c84372c6a1aa1fe32bb269.tar.bz2 linux-9de4999050b5f2e847c84372c6a1aa1fe32bb269.zip |
x86/realmode: Add comment for Global bit usage in trampoline_pgd
Document the fact that using the trampoline_pgd will result in the
creation of global TLB entries in the user range of the address
space.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211202153226.22946-2-joro@8bytes.org
-rw-r--r-- | arch/x86/mm/init.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 1895986842b9..4ba024d5b63a 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c @@ -714,6 +714,11 @@ static void __init memory_map_bottom_up(unsigned long map_start, static void __init init_trampoline(void) { #ifdef CONFIG_X86_64 + /* + * The code below will alias kernel page-tables in the user-range of the + * address space, including the Global bit. So global TLB entries will + * be created when using the trampoline page-table. + */ if (!kaslr_memory_enabled()) trampoline_pgd_entry = init_top_pgt[pgd_index(__PAGE_OFFSET)]; else |