On Wed, Dec 31, 2025 at 04:44:05AM -0800, Breno Leitao wrote: > The arm64 kernel doesn't boot with annotated branches > (PROFILE_ANNOTATED_BRANCHES) enabled and CONFIG_DEBUG_VIRTUAL together. > > Bisecting it, I found that disabling branch profiling in arch/arm64/mm > solved the problem. Narrowing down a bit further, I found that > physaddr.c is the file that needs to have branch profiling disabled to > get the machine to boot. > > I suspect that it might invoke some ftrace helper very early in the boot > process and ftrace is still not enabled(!?). > > Disable branch profiling for physaddr.o to allow booting an arm64 > machine with CONFIG_PROFILE_ANNOTATED_BRANCHES and > CONFIG_DEBUG_VIRTUAL together. > > Cc: [email protected] > Fixes: ec6d06efb0bac ("arm64: Add support for CONFIG_DEBUG_VIRTUAL") > Signed-off-by: Breno Leitao <[email protected]> > --- > Another approach is to disable profiling on all arch/arm64 code, similarly to > x86, where DISABLE_BRANCH_PROFILING is called for all arch/x86 code. See > commit 2cbb20b008dba ("tracing: Disable branch profiling in noinstr > code").
Yes, let's start with arch/arm64/. We know that's safe and then if somebody wants to make it finer-grained, it's on them to figure out a way to do it without playing whack-a-mole. Will
