From: Ard Biesheuvel Date: Tue, 7 Jan 2025 15:18:27 +0000 (+0100) Subject: x86/sev: Disable ftrace branch profiling in SEV startup code X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=cf4ca80650908628bf1c0c29e3fd236b1915d789;p=users%2Fdwmw2%2Flinux.git x86/sev: Disable ftrace branch profiling in SEV startup code Ftrace branch profiling inserts absolute references to its metadata at call sites, and this implies that this kind of instrumentation cannot be used while executing from the 1:1 mapping of memory. Therefore, disable ftrace branch profiling in the SEV startup routines, by disabling it for the entire SEV core source file. Closes: https://lore.kernel.org/oe-kbuild-all/202501072244.zZrx9864-lkp@intel.com/ Reported-by: kernel test robot Signed-off-by: Ard Biesheuvel Signed-off-by: Borislav Petkov (AMD) Acked-by: Tom Lendacky Link: https://lore.kernel.org/r/20250107151826.820147-2-ardb+git@google.com --- diff --git a/arch/x86/coco/sev/core.c b/arch/x86/coco/sev/core.c index 86898547056e7..b5c6c4afd1cc6 100644 --- a/arch/x86/coco/sev/core.c +++ b/arch/x86/coco/sev/core.c @@ -9,6 +9,8 @@ #define pr_fmt(fmt) "SEV: " fmt +#define DISABLE_BRANCH_PROFILING + #include /* For show_regs() */ #include #include