summaryrefslogtreecommitdiff
path: root/arch/x86/include/uapi
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2023-12-05 02:50:00 -0800
committerBorislav Petkov (AMD) <bp@alien8.de>2024-01-31 22:00:38 +0100
commitff45746fbf005f96e42bea466698e3fdbf926013 (patch)
tree996ccca80c84a3e2000681b4676f3fb7a844d83c /arch/x86/include/uapi
parentcd19bab825bda5bb192ef1d22e67d069daf2efb8 (diff)
downloadlwn-ff45746fbf005f96e42bea466698e3fdbf926013.tar.gz
lwn-ff45746fbf005f96e42bea466698e3fdbf926013.zip
x86/cpu: Add X86_CR4_FRED macro
Add X86_CR4_FRED macro for the FRED bit in %cr4. This bit must not be changed after initialization, so add it to the pinned CR4 bits. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Signed-off-by: Xin Li <xin3.li@intel.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Tested-by: Shan Kang <shan.kang@intel.com> Link: https://lore.kernel.org/r/20231205105030.8698-12-xin3.li@intel.com
Diffstat (limited to 'arch/x86/include/uapi')
-rw-r--r--arch/x86/include/uapi/asm/processor-flags.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/uapi/asm/processor-flags.h b/arch/x86/include/uapi/asm/processor-flags.h
index d898432947ff..f1a4adc78272 100644
--- a/arch/x86/include/uapi/asm/processor-flags.h
+++ b/arch/x86/include/uapi/asm/processor-flags.h
@@ -139,6 +139,13 @@
#define X86_CR4_LAM_SUP_BIT 28 /* LAM for supervisor pointers */
#define X86_CR4_LAM_SUP _BITUL(X86_CR4_LAM_SUP_BIT)
+#ifdef __x86_64__
+#define X86_CR4_FRED_BIT 32 /* enable FRED kernel entry */
+#define X86_CR4_FRED _BITUL(X86_CR4_FRED_BIT)
+#else
+#define X86_CR4_FRED (0)
+#endif
+
/*
* x86-64 Task Priority Register, CR8
*/