summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/head64.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2021-12-02 16:32:24 +0100
committerBorislav Petkov <bp@suse.de>2021-12-06 09:38:48 +0100
commitf154f290855b070cc94dd44ad253c0ef8a9337bb (patch)
tree804830bc075803ec0553bb866cf2612f1f504447 /arch/x86/kernel/head64.c
parent9de4999050b5f2e847c84372c6a1aa1fe32bb269 (diff)
x86/mm/64: Flush global TLB on boot and AP bringup
The AP bringup code uses the trampoline_pgd page-table which establishes global mappings in the user range of the address space. Flush the global TLB entries after the indentity mappings are removed so no stale entries remain in the TLB. Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20211202153226.22946-3-joro@8bytes.org
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r--arch/x86/kernel/head64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index fc5371a7e9d1..75acb6027a87 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -483,6 +483,8 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
/* Kill off the identity-map trampoline */
reset_early_page_tables();
+ __native_tlb_flush_global(native_read_cr4());
+
clear_bss();
clear_page(init_top_pgt);