Skip to content

Commit 837d632

Browse files
vdonnefortMarc Zyngier
authored andcommitted
KVM: arm64: Enable stack protection and branch profiling for VHE
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 <[email protected]> Reviewed-by: Quentin Perret <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 5994bc9 commit 837d632

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

arch/arm64/kvm/hyp/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55

66
incdir := $(srctree)/$(src)/include
77
subdir-asflags-y := -I$(incdir)
8-
subdir-ccflags-y := -I$(incdir) \
9-
-fno-stack-protector \
10-
-DDISABLE_BRANCH_PROFILING \
11-
$(DISABLE_STACKLEAK_PLUGIN)
8+
subdir-ccflags-y := -I$(incdir)
129

1310
obj-$(CONFIG_KVM) += vhe/ nvhe/ pgtable.o

arch/arm64/kvm/hyp/nvhe/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ asflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS
1010
# will explode instantly (Words of Marc Zyngier). So introduce a generic flag
1111
# __DISABLE_TRACE_MMIO__ to disable MMIO tracing for nVHE KVM.
1212
ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS -D__DISABLE_TRACE_MMIO__
13+
ccflags-y += -fno-stack-protector \
14+
-DDISABLE_BRANCH_PROFILING \
15+
$(DISABLE_STACKLEAK_PLUGIN)
1316

1417
hostprogs := gen-hyprel
1518
HOST_EXTRACFLAGS += -I$(objtree)/include

0 commit comments

Comments
 (0)