Add a macro-definition for the x86 `KERNEL_GS_BASE` MSR that is usually
used in conjunction with the `swapgs` instruction for an efficient swap
between the `gs_base` register placed in `KERNEL_GS_BASE` and `GS_BASE`.
Co-authored-by: Marco Schlumpp <marco@unikraft.io>
Signed-off-by: Marco Schlumpp <marco@unikraft.io>
Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
/* FS and GS Registers in 64-bit Mode */
#define X86_MSR_FS_BASE 0xc0000100
#define X86_MSR_GS_BASE 0xc0000101
+/* Used in conjunction with swapgs instruction */
+#define X86_MSR_KERNEL_GS_BASE 0xc0000102
/* extended feature register */
#define X86_MSR_EFER 0xc0000080
/* legacy mode SYSCALL target */