[PATCH 1/3] KVM: arm64: fix include path for ring buffer implementation

Arnd Bergmann arnd at kernel.org
Thu Mar 12 05:35:42 PDT 2026


From: Arnd Bergmann <arnd at arndb.de>

The simple_ring_buffer.c file is in the source tree rather than
generated at build time, so the include path is wrong when using
separate object trees:

arch/arm64/kvm/hyp/nvhe/trace.c:16:10: fatal error: simple_ring_buffer.c: No such file or directory
   16 | #include "simple_ring_buffer.c"

Include it from the source tree instead.

Fixes: 680a04c333fa ("KVM: arm64: Add tracing capability for the nVHE/pKVM hyp")
Signed-off-by: Arnd Bergmann <arnd at arndb.de>
---
 arch/arm64/kvm/hyp/nvhe/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile
index 143d55ec7298..3d33fbefdfc1 100644
--- a/arch/arm64/kvm/hyp/nvhe/Makefile
+++ b/arch/arm64/kvm/hyp/nvhe/Makefile
@@ -33,7 +33,7 @@ hyp-obj-$(CONFIG_NVHE_EL2_TRACING) += clock.o trace.o events.o
 hyp-obj-y += $(lib-objs)
 
 # Path to simple_ring_buffer.c
-CFLAGS_trace.nvhe.o += -I$(objtree)/kernel/trace/
+CFLAGS_trace.nvhe.o += -I$(srctree)/kernel/trace/
 
 ##
 ## Build rules for compiling nVHE hyp code
-- 
2.39.5




More information about the linux-arm-kernel mailing list