clean up segment regs
This commit is contained in:
+2
-2
@@ -208,14 +208,14 @@ void arch_sched_jump_to_user(uintptr_t ip, uintptr_t sp, uintptr_t arg) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
uintptr_t percpu = asm_rdmsr(MSR_GS_BASE);
|
uintptr_t percpu = asm_rdmsr(MSR_GS_BASE);
|
||||||
const uint16_t zero = 0;
|
|
||||||
asm volatile(
|
asm volatile(
|
||||||
"mov ds, %0\n"
|
"mov ds, %0\n"
|
||||||
"mov es, %0\n"
|
"mov es, %0\n"
|
||||||
"mov fs, %0\n"
|
"mov fs, %0\n"
|
||||||
"mov gs, %0\n"
|
"mov gs, %0\n"
|
||||||
:
|
:
|
||||||
: "r"(zero)
|
: "a"(0)
|
||||||
|
: "memory"
|
||||||
);
|
);
|
||||||
|
|
||||||
asm_wrmsr(MSR_FS_BASE, 0);
|
asm_wrmsr(MSR_FS_BASE, 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user