summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/fred.h
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2023-12-09 13:42:14 -0800
committerBorislav Petkov (AMD) <bp@alien8.de>2024-01-31 22:02:31 +0100
commit14619d912b658ecd9573fb88400d3830a29cadcb (patch)
tree8de248a587245122eba294060ec9ec98c98b0d2e /arch/x86/include/asm/fred.h
parentffa4901f0e004e1a0a4e18a2452a1fcc27277cc0 (diff)
downloadlwn-14619d912b658ecd9573fb88400d3830a29cadcb.tar.gz
lwn-14619d912b658ecd9573fb88400d3830a29cadcb.zip
x86/fred: FRED entry/exit and dispatch code
The code to actually handle kernel and event entry/exit using FRED. It is split up into two files thus: - entry_64_fred.S contains the actual entrypoints and exit code, and saves and restores registers. - entry_fred.c contains the two-level event dispatch code for FRED. The first-level dispatch is on the event type, and the second-level is on the event vector. [ bp: Fold in an allmodconfig clang build fix: https://lore.kernel.org/r/20240129064521.5168-1-xin3.li@intel.com and a CONFIG_IA32_EMULATION=n build fix: https://lore.kernel.org/r/20240127093728.1323-3-xin3.li@intel.com] Suggested-by: Thomas Gleixner <tglx@linutronix.de> Originally-by: Megha Dey <megha.dey@intel.com> Co-developed-by: Xin Li <xin3.li@intel.com> 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/20231209214214.2932-1-xin3.li@intel.com
Diffstat (limited to 'arch/x86/include/asm/fred.h')
-rw-r--r--arch/x86/include/asm/fred.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/fred.h b/arch/x86/include/asm/fred.h
index f514fdb5a39f..16a64ffecbf8 100644
--- a/arch/x86/include/asm/fred.h
+++ b/arch/x86/include/asm/fred.h
@@ -60,6 +60,12 @@ static __always_inline unsigned long fred_event_data(struct pt_regs *regs)
return fred_info(regs)->edata;
}
+void asm_fred_entrypoint_user(void);
+void asm_fred_entrypoint_kernel(void);
+
+__visible void fred_entry_from_user(struct pt_regs *regs);
+__visible void fred_entry_from_kernel(struct pt_regs *regs);
+
#else /* CONFIG_X86_FRED */
static __always_inline unsigned long fred_event_data(struct pt_regs *regs) { return 0; }
#endif /* CONFIG_X86_FRED */