CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2011/04/05 15:14:00
Modified files:
sys/arch/amd64/amd64: cpu.c genassym.cf locore.S machdep.c
sys_machdep.c
sys/arch/amd64/include: cpu.h frameasm.h pcb.h sysarch.h
lib/libarch/amd64: Makefile
Added files:
lib/libarch/amd64: amd64_get_fsbase.2 amd64_get_fsbase.c
amd64_set_fsbase.c
Log message:
Add support for per-rthread base-offset for the %fs selector on amd64.
Add pcb_fsbase to the PCB for tracking what the value for the thread
is, and ci_cur_fsbase to struct cpu_info for tracking the CPU's current
value for FS.base, then on return to user-space, skip the setting if the
CPU has the right value already. Non-threaded processes without TLS leave
FS.base zero, which can be conveniently optimized: setting %fs zeros
FS.base for fewer cycles than wrmsr.
ok kettenis@