xref: /linux/arch/arm64/kvm/hyp/nvhe/Makefile (revision c04dd455eb311d2d289c9d81d080eaf11a06cebf)
176217129SDavid Brazdil# SPDX-License-Identifier: GPL-2.0
276217129SDavid Brazdil#
376217129SDavid Brazdil# Makefile for Kernel-based Virtual Machine module, HYP/nVHE part
476217129SDavid Brazdil#
576217129SDavid Brazdil
676217129SDavid Brazdilasflags-y := -D__KVM_NVHE_HYPERVISOR__
776217129SDavid Brazdilccflags-y := -D__KVM_NVHE_HYPERVISOR__
876217129SDavid Brazdil
9*c04dd455SDavid Brazdilobj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o
10*c04dd455SDavid Brazdilobj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
11*c04dd455SDavid Brazdil	 ../fpsimd.o ../hyp-entry.o
1276217129SDavid Brazdil
1376217129SDavid Brazdilobj-y := $(patsubst %.o,%.hyp.o,$(obj-y))
1476217129SDavid Brazdilextra-y := $(patsubst %.hyp.o,%.hyp.tmp.o,$(obj-y))
1576217129SDavid Brazdil
1676217129SDavid Brazdil$(obj)/%.hyp.tmp.o: $(src)/%.c FORCE
1776217129SDavid Brazdil	$(call if_changed_rule,cc_o_c)
1876217129SDavid Brazdil$(obj)/%.hyp.tmp.o: $(src)/%.S FORCE
1976217129SDavid Brazdil	$(call if_changed_rule,as_o_S)
2076217129SDavid Brazdil$(obj)/%.hyp.o: $(obj)/%.hyp.tmp.o FORCE
2176217129SDavid Brazdil	$(call if_changed,hypcopy)
2276217129SDavid Brazdil
2376217129SDavid Brazdilquiet_cmd_hypcopy = HYPCOPY $@
2476217129SDavid Brazdil      cmd_hypcopy = $(OBJCOPY) --prefix-symbols=__kvm_nvhe_ $< $@
2576217129SDavid Brazdil
2676217129SDavid Brazdil# KVM nVHE code is run at a different exception code with a different map, so
2776217129SDavid Brazdil# compiler instrumentation that inserts callbacks or checks into the code may
2876217129SDavid Brazdil# cause crashes. Just disable it.
2976217129SDavid BrazdilGCOV_PROFILE	:= n
3076217129SDavid BrazdilKASAN_SANITIZE	:= n
3176217129SDavid BrazdilUBSAN_SANITIZE	:= n
3276217129SDavid BrazdilKCOV_INSTRUMENT	:= n
3376217129SDavid Brazdil
3476217129SDavid Brazdil# Skip objtool checking for this directory because nVHE code is compiled with
3576217129SDavid Brazdil# non-standard build rules.
3676217129SDavid BrazdilOBJECT_FILES_NON_STANDARD := y
37