x86_64: implement proper user/kernel %gs base switching
the %gs base address is now always set to the current cpu block while in kernel-mode, and is switched back to the userspace %gs base when returning to user-mode.
This commit is contained in:
@@ -3,7 +3,8 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MSR_GS_BASE 0xC0000101
|
||||
#define MSR_GS_BASE 0xC0000101
|
||||
#define MSR_KERNEL_GS_BASE 0xC0000102
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
Reference in New Issue
Block a user