This commit moves the write to FS and GS base, allowing for a much more efficient write to GS base under x86-64 SMP. When writing GS base was in Arch_switchToThread it was neccessary to write to an MSR such that when swapgs was performed on kernel exit the new value of GS base would be retrieved. Unfortunately writing to an MSR is very expensive and we would much prefer to use the writegsbase instructions instead. By moving this code to restore user context we are able to call swapgs earlier and then use the normal writegsbase instruction |
||
|---|---|---|
| .. | ||
| arm | ||
| x86/arch | ||