Page 2 of 2

Re: Single address space in Long mode

Posted: Tue Jan 12, 2010 10:24 am
by Combuster
No, it works with multiple CPUs, multiple address spaces and multithreading.

Re: Single address space in Long mode

Posted: Tue Jan 12, 2010 1:25 pm
by jal
Combuster wrote:
jal wrote:but that means the scheduler must update the MSR when switching tasks.
Not necessarily. You can just have it contain a pointer to a valid temporary stack, then update ESP manually. (instead of finding out the value for ESP, then bothering the slow WRMSR with it)
Indeed. Thanks for pointing it out.


JAL

Re: Single address space in Long mode

Posted: Tue Jan 12, 2010 1:55 pm
by Owen
The convention with syscall/sysret is to use the SWAPGS instruction and hang a "processor control block" off of the kernel's GS.

For this reason, I'm looking forward to clang & llvm maturing, because they have support for declaring a pointer off the GS segment, and therefore better optimized code.