From ca7fb9760b60d632899b6e669f972d7c97ffa72f Mon Sep 17 00:00:00 2001 From: mintsuki Date: Sat, 16 Sep 2023 00:20:32 -0500 Subject: [PATCH] smp/x86: Trampoline: clear TLB before jumping to kernel code --- common/sys/smp_trampoline.asm_x86 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/sys/smp_trampoline.asm_x86 b/common/sys/smp_trampoline.asm_x86 index 59f581b0b..928b315c4 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