Save/restore GS BASE by invoking 'swapgs'

The user space program may mysteriously change GS BASE in MSR, ruining
per-cpu storage in kernel if not handled. This patch invokes 'swapgs'
at the beginning and end of the trap handler to avoid the issue.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Get rid of PLS-related code in amd64

PLS (Processor Local Storage) is the legacy per-cpu storage implementation
derived from the old supervisor-based multi-core support. Replace them
with the latest per-cpu macros.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Remove src/glue-kern/*** in amd64 code

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Get rid of glue_*** under src/kern-ucore/arch

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Get rid of glue-*** under kern-ucore

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Move amd64 non-generic multi-core code under arch/amd64/mp

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Clean up duplicated next_thread()

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Boot APs

Now the AP spins after boot-up. Share pagetable with BSP.
XXX: longmode_ap_entry  will raise #GP if stack > 1GB (only map 1G in boot pgd)