it doenst matter to runtime what data segment selectors have been
loaded in the segment registers in long mode. we initially load
them with null seletors and then never touch them again.

but the processor *does* check the selectors index when you load
a selector into a segment register!

the reason i removed the saving and restoring is that i can stop
worrying about bad data selectors when devproc or noted sets the ureg
of a process. 

we had todo this on 386 because otherwise the process would #GP when 
trying to restore the bad selectors. now without restoring the segment
registers, it cant #GP and nothing needs to be checked.

for GS/FS theres new GS_BASE and FS_BASE msr register that the kernel
can set to change GS and FS segment offsets affetcing the offset used
by GS and FS segment prefixes. but the kernel would need to switch
these msrs in and out for each process and provide a interface
for userspace to set ther base. you will need this for something
like linuxemu.

--
cinap

Reply via email to