KVM: arm64: Enable stack protection and branch profiling for VHE
authorVincent Donnefort <vdonnefort@google.com>
Tue, 4 Oct 2022 15:42:16 +0000 (16:42 +0100)
committerMarc Zyngier <maz@kernel.org>
Sun, 9 Oct 2022 02:15:55 +0000 (03:15 +0100)
For historical reasons, the VHE code inherited the build configuration from
nVHE. Now those two parts have their own folder and makefile, we can
enable stack protection and branch profiling for VHE.

Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
Reviewed-by: Quentin Perret <qperret@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20221004154216.2833636-1-vdonnefort@google.com
arch/arm64/kvm/hyp/Makefile
arch/arm64/kvm/hyp/nvhe/Makefile

index 687598e41b21f68c76479aac298507af58dd7221..a38dea6186c90a037d70b67b13276dd2ca3cb2d2 100644 (file)
@@ -5,9 +5,6 @@
 
 incdir := $(srctree)/$(src)/include
 subdir-asflags-y := -I$(incdir)
-subdir-ccflags-y := -I$(incdir)                                \
-                   -fno-stack-protector                \
-                   -DDISABLE_BRANCH_PROFILING          \
-                   $(DISABLE_STACKLEAK_PLUGIN)
+subdir-ccflags-y := -I$(incdir)
 
 obj-$(CONFIG_KVM) += vhe/ nvhe/ pgtable.o
index b5c5119c7396b42015e90f8ac1209334a4390e1c..48f6ae7cc6e6491e37fbd439e2a0234c855e4c3f 100644 (file)
@@ -10,6 +10,9 @@ asflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS
 # will explode instantly (Words of Marc Zyngier). So introduce a generic flag
 # __DISABLE_TRACE_MMIO__ to disable MMIO tracing for nVHE KVM.
 ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS -D__DISABLE_TRACE_MMIO__
+ccflags-y += -fno-stack-protector      \
+            -DDISABLE_BRANCH_PROFILING \
+            $(DISABLE_STACKLEAK_PLUGIN)
 
 hostprogs := gen-hyprel
 HOST_EXTRACFLAGS += -I$(objtree)/include