:: commit ca7fb9760b60d632899b6e669f972d7c97ffa72f

mintsuki <mintsuki@protonmail.com> — 2023-09-16 05:20

parents: db04cd2595

smp/x86: Trampoline: clear TLB before jumping to kernel code

diff --git a/common/sys/smp_trampoline.asm_x86 b/common/sys/smp_trampoline.asm_x86
index 59f581b0..928b315c 100644
--- a/common/sys/smp_trampoline.asm_x86
+++ b/common/sys/smp_trampoline.asm_x86
@@ -168,6 +168,10 @@ parking64:
     jmp .loop
 
   .out:
+    ; Clear TLB
+    mov rax, cr3
+    mov cr3, rax
+
     mov rsp, qword [rdi + 8]
     push 0
     push rax
tab: 248 wrap: offon