1# SPDX-License-Identifier: GPL-2.0 2# 3# Makefile for Kernel-based Virtual Machine module, HYP/nVHE part 4# 5 6asflags-y := -D__KVM_NVHE_HYPERVISOR__ 7ccflags-y := -D__KVM_NVHE_HYPERVISOR__ 8 9obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o 10obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \ 11 ../fpsimd.o ../hyp-entry.o 12 13obj-y := $(patsubst %.o,%.hyp.o,$(obj-y)) 14extra-y := $(patsubst %.hyp.o,%.hyp.tmp.o,$(obj-y)) 15 16$(obj)/%.hyp.tmp.o: $(src)/%.c FORCE 17 $(call if_changed_rule,cc_o_c) 18$(obj)/%.hyp.tmp.o: $(src)/%.S FORCE 19 $(call if_changed_rule,as_o_S) 20$(obj)/%.hyp.o: $(obj)/%.hyp.tmp.o FORCE 21 $(call if_changed,hypcopy) 22 23quiet_cmd_hypcopy = HYPCOPY $@ 24 cmd_hypcopy = $(OBJCOPY) --prefix-symbols=__kvm_nvhe_ $< $@ 25 26# KVM nVHE code is run at a different exception code with a different map, so 27# compiler instrumentation that inserts callbacks or checks into the code may 28# cause crashes. Just disable it. 29GCOV_PROFILE := n 30KASAN_SANITIZE := n 31UBSAN_SANITIZE := n 32KCOV_INSTRUMENT := n 33 34# Skip objtool checking for this directory because nVHE code is compiled with 35# non-standard build rules. 36OBJECT_FILES_NON_STANDARD := y 37