To make selectors work reliably, we need to
write zero to it before writing its final value.
---
 i386/i386/cpuboot.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/i386/i386/cpuboot.S b/i386/i386/cpuboot.S
index 09855864..f549a2bc 100644
--- a/i386/i386/cpuboot.S
+++ b/i386/i386/cpuboot.S
@@ -182,6 +182,8 @@ apboot_jmp_offset:
        shr     $8, %ax
        movb    %al, apboot_percpu_high
 
+       xorl    %ebx, %ebx
+       movw    %bx, %gs
        movw    $PERCPU_DS, %ax
        movw    %ax, %gs
 
-- 
2.45.2



Reply via email to