mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
623e1528d4
KVM has helpers to handle the condition codes of trapped aarch32 instructions. These are marked __hyp_text and used from HYP, but they aren't built by the 'hyp' Makefile, which has all the runes to avoid ASAN and KCOV instrumentation. Move this code to a new hyp/aarch32.c to avoid a hyp-panic when starting an aarch32 guest on a host built with the ASAN/KCOV debug options. Fixes:021234ef37
("KVM: arm64: Make kvm_condition_valid32() accessible from EL2") Fixes:8cebe750c4
("arm64: KVM: Make kvm_skip_instr32 available to HYP") Signed-off-by: James Morse <james.morse@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
35 lines
1.1 KiB
Makefile
35 lines
1.1 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# Makefile for Kernel-based Virtual Machine module, HYP part
|
|
#
|
|
|
|
ccflags-y += -fno-stack-protector -DDISABLE_BRANCH_PROFILING
|
|
|
|
KVM=../../../../virt/kvm
|
|
|
|
CFLAGS_ARMV7VE :=$(call cc-option, -march=armv7ve)
|
|
|
|
obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v3-sr.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/timer-sr.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/aarch32.o
|
|
|
|
obj-$(CONFIG_KVM_ARM_HOST) += tlb.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += cp15-sr.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += vfp.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += banked-sr.o
|
|
CFLAGS_banked-sr.o += $(CFLAGS_ARMV7VE)
|
|
|
|
obj-$(CONFIG_KVM_ARM_HOST) += entry.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += hyp-entry.o
|
|
obj-$(CONFIG_KVM_ARM_HOST) += switch.o
|
|
CFLAGS_switch.o += $(CFLAGS_ARMV7VE)
|
|
obj-$(CONFIG_KVM_ARM_HOST) += s2-setup.o
|
|
|
|
# KVM code is run at a different exception code with a different map, so
|
|
# compiler instrumentation that inserts callbacks or checks into the code may
|
|
# cause crashes. Just disable it.
|
|
GCOV_PROFILE := n
|
|
KASAN_SANITIZE := n
|
|
UBSAN_SANITIZE := n
|
|
KCOV_INSTRUMENT := n
|