Skip to content

Commit 9de4999

Browse files
joergroedelsuryasaimadhu
authored andcommitted
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 <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent e1cd82a commit 9de4999

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/x86/mm/init.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,11 @@ static void __init memory_map_bottom_up(unsigned long map_start,
714714
static void __init init_trampoline(void)
715715
{
716716
#ifdef CONFIG_X86_64
717+
/*
718+
* The code below will alias kernel page-tables in the user-range of the
719+
* address space, including the Global bit. So global TLB entries will
720+
* be created when using the trampoline page-table.
721+
*/
717722
if (!kaslr_memory_enabled())
718723
trampoline_pgd_entry = init_top_pgt[pgd_index(__PAGE_OFFSET)];
719724
else

0 commit comments

Comments
 (0)