Skip to content

Commit cf4ca80

Browse files
ardbiesheuvelbp3tk0v
authored andcommitted
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/[email protected]/ Reported-by: kernel test robot <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Acked-by: Tom Lendacky <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7c61a3d commit cf4ca80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/coco/sev/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
#define pr_fmt(fmt) "SEV: " fmt
1111

12+
#define DISABLE_BRANCH_PROFILING
13+
1214
#include <linux/sched/debug.h> /* For show_regs() */
1315
#include <linux/percpu-defs.h>
1416
#include <linux/cc_platform.h>

0 commit comments

Comments
 (0)