From: Sergiu Moga Date: Wed, 1 Nov 2023 06:32:07 +0000 (+0200) Subject: plat/common/x86: Add macro-definition for `X86_MSR_KERNEL_GS_BASE` X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=d4cdec192e226147a77aacf33176a854cd5135a2;p=unikraft%2Funikraft.git plat/common/x86: Add macro-definition for `X86_MSR_KERNEL_GS_BASE` 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 Signed-off-by: Marco Schlumpp Signed-off-by: Sergiu Moga --- diff --git a/plat/common/include/x86/cpu_defs.h b/plat/common/include/x86/cpu_defs.h index 487af7eff..02497dcb0 100644 --- a/plat/common/include/x86/cpu_defs.h +++ b/plat/common/include/x86/cpu_defs.h @@ -91,6 +91,8 @@ /* 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 */