Skip to content

Commit f9b269f

Browse files
Julien Thierrychazy
authored andcommitted
arm/arm64: kvm: Disable branch profiling in HYP code
When HYP code runs into branch profiling code, it attempts to jump to unmapped memory, causing a HYP Panic. Disable the branch profiling for code designed to run at HYP mode. Signed-off-by: Julien Thierry <julien.thierry@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: Christoffer Dall <christoffer.dall@linaro.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Russell King <linux@armlinux.org.uk> Cc: <stable@vger.kernel.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
1 parent fe7d7b0 commit f9b269f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

arch/arm/kvm/hyp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Makefile for Kernel-based Virtual Machine module, HYP part
33
#
44

5-
ccflags-y += -fno-stack-protector
5+
ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING
66

77
KVM=../../../../virt/kvm
88

arch/arm64/kvm/hyp/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Makefile for Kernel-based Virtual Machine module, HYP part
33
#
44

5-
ccflags-y += -fno-stack-protector
5+
ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING
66

77
KVM=../../../../virt/kvm
88

0 commit comments

Comments
 (0)