diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index f34b0cc..03f0eca 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -249,6 +249,12 @@ store_seg: 1: movl %ds,PCB_DS(%r8) movl %es,PCB_ES(%r8) movl %fs,PCB_FS(%r8) + movq %rdx,%r11 + movl $MSR_FSBASE,%ecx + rdmsr + shlq $32,%rdx + leaq (%rax,%rdx),%r9 + movq %r11,%rdx jmp done_store_seg 2: movq PCB_GS32P(%r8),%rax movq (%rax),%rax