All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: arm64: nvhe: Disable profile optimization
@ 2022-09-20  8:20 ` Denis Nikitin
  0 siblings, 0 replies; 42+ messages in thread
From: Denis Nikitin @ 2022-09-20  8:20 UTC (permalink / raw)
  To: Marc Zyngier, Catalin Marinas, Will Deacon
  Cc: James Morse, Alexandru Elisei, Nick Desaulniers, Manoj Gupta,
	David Brazdil, linux-arm-kernel, kvmarm, linux-kernel,
	Denis Nikitin

Kernel build with -fprofile-sample-use raises the following failure:

error: arch/arm64/kvm/hyp/nvhe/kvm_nvhe.tmp.o: Unexpected SHT_REL
section ".rel.llvm.call-graph-profile"

SHT_REL is generated by the latest lld, see
https://reviews.llvm.org/rGca3bdb57fa1ac98b711a735de048c12b5fdd8086.
Disable profile optimization in kvm/nvhe to fix the build with
AutoFDO.

Signed-off-by: Denis Nikitin <denik@chromium.org>
---
 arch/arm64/kvm/hyp/nvhe/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile
index b5c5119c7396..6a6188374a52 100644
--- a/arch/arm64/kvm/hyp/nvhe/Makefile
+++ b/arch/arm64/kvm/hyp/nvhe/Makefile
@@ -89,6 +89,9 @@ quiet_cmd_hypcopy = HYPCOPY $@
 # Remove ftrace, Shadow Call Stack, and CFI CFLAGS.
 # This is equivalent to the 'notrace', '__noscs', and '__nocfi' annotations.
 KBUILD_CFLAGS := $(filter-out $(CC_FLAGS_FTRACE) $(CC_FLAGS_SCS) $(CC_FLAGS_CFI), $(KBUILD_CFLAGS))
+# Profile optimization creates SHT_REL section '.llvm.call-graph-profile' for
+# the hot code. SHT_REL is currently not supported by the KVM tools.
+KBUILD_CFLAGS += $(call cc-option,-fno-profile-sample-use,-fno-profile-use)
 
 # KVM nVHE code is run at a different exception code with a different map, so
 # compiler instrumentation that inserts callbacks or checks into the code may
-- 
2.37.3.968.ga6b4b080e4-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2022-10-13 19:04 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  8:20 [PATCH] KVM: arm64: nvhe: Disable profile optimization Denis Nikitin
2022-09-20  8:20 ` Denis Nikitin
2022-09-20  9:33 ` Marc Zyngier
2022-09-20  9:33   ` Marc Zyngier
2022-09-20  9:33   ` Marc Zyngier
2022-09-21  0:08   ` Denis Nikitin
2022-09-21  0:08     ` Denis Nikitin
2022-09-21  0:08     ` Denis Nikitin
2022-09-21  6:02     ` Denis Nikitin
2022-09-21  6:02       ` Denis Nikitin
2022-09-21  6:02       ` Denis Nikitin
2022-09-21 17:25       ` Marc Zyngier
2022-09-21 17:25         ` Marc Zyngier
2022-09-21 17:25         ` Marc Zyngier
2022-09-22  5:31 ` [PATCH v2] KVM: arm64: nvhe: Fix build with " Denis Nikitin
2022-09-22  5:31   ` Denis Nikitin
2022-09-22  5:31   ` Denis Nikitin
2022-09-22 10:37   ` Marc Zyngier
2022-09-22 10:37     ` Marc Zyngier
2022-09-22 10:37     ` Marc Zyngier
2022-09-23  5:01     ` Denis Nikitin
2022-09-23  5:01       ` Denis Nikitin
2022-09-23  5:01       ` Denis Nikitin
2022-09-23  6:04       ` Manoj Gupta
2022-09-29 16:13         ` Denis Nikitin
2022-09-29 16:13           ` Denis Nikitin
2022-09-29 16:13           ` Denis Nikitin
2022-10-06 16:28           ` Denis Nikitin
2022-10-06 16:28             ` Denis Nikitin
2022-10-06 16:28             ` Denis Nikitin
2022-10-09  2:20             ` Marc Zyngier
2022-10-09  2:20               ` Marc Zyngier
2022-10-09  2:20               ` Marc Zyngier
2022-10-11  2:15               ` Denis Nikitin
2022-10-11  2:15                 ` Denis Nikitin
2022-10-11  2:15                 ` Denis Nikitin
2022-10-13 11:09                 ` Marc Zyngier
2022-10-13 11:09                   ` Marc Zyngier
2022-10-13 11:09                   ` Marc Zyngier
2022-10-13 19:02                   ` Denis Nikitin
2022-10-13 19:02                     ` Denis Nikitin
2022-10-13 19:02                     ` Denis Nikitin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.