Makefile (93929fb6c4ef6211e96679f060c842f35fac7710) Makefile (3d5697f95e492899d0bf813cbab2af03dde77fa2)
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__ -D__DISABLE_EXPORTS
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__ -D__DISABLE_EXPORTS
7ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS
7
8
8# Tracepoint and MMIO logging symbols should not be visible at nVHE KVM as
9# there is no way to execute them and any such MMIO access from nVHE KVM
10# will explode instantly (Words of Marc Zyngier). So introduce a generic flag
11# __DISABLE_TRACE_MMIO__ to disable MMIO tracing for nVHE KVM.
12ccflags-y := -D__KVM_NVHE_HYPERVISOR__ -D__DISABLE_EXPORTS -D__DISABLE_TRACE_MMIO__
13
14hostprogs := gen-hyprel
15HOST_EXTRACFLAGS += -I$(objtree)/include
16
17lib-objs := clear_page.o copy_page.o memcpy.o memset.o
18lib-objs := $(addprefix ../../../lib/, $(lib-objs))
19
9hostprogs := gen-hyprel
10HOST_EXTRACFLAGS += -I$(objtree)/include
11
12lib-objs := clear_page.o copy_page.o memcpy.o memset.o
13lib-objs := $(addprefix ../../../lib/, $(lib-objs))
14
20obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \
15hyp-obj-y := timer-sr.o sysreg-sr.o debug-sr.o switch.o tlb.o hyp-init.o host.o \
21 hyp-main.o hyp-smp.o psci-relay.o early_alloc.o page_alloc.o \
22 cache.o setup.o mm.o mem_protect.o sys_regs.o pkvm.o
16 hyp-main.o hyp-smp.o psci-relay.o early_alloc.o page_alloc.o \
17 cache.o setup.o mm.o mem_protect.o sys_regs.o pkvm.o
23obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
18hyp-obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
24 ../fpsimd.o ../hyp-entry.o ../exception.o ../pgtable.o
19 ../fpsimd.o ../hyp-entry.o ../exception.o ../pgtable.o
25obj-$(CONFIG_DEBUG_LIST) += list_debug.o
26obj-y += $(lib-objs)
20hyp-obj-$(CONFIG_DEBUG_LIST) += list_debug.o
21hyp-obj-y += $(lib-objs)
27
28##
29## Build rules for compiling nVHE hyp code
30## Output of this folder is `kvm_nvhe.o`, a partially linked object
31## file containing all nVHE hyp code and data.
32##
33
22
23##
24## Build rules for compiling nVHE hyp code
25## Output of this folder is `kvm_nvhe.o`, a partially linked object
26## file containing all nVHE hyp code and data.
27##
28
34hyp-obj := $(patsubst %.o,%.nvhe.o,$(obj-y))
29hyp-obj := $(patsubst %.o,%.nvhe.o,$(hyp-obj-y))
35obj-y := kvm_nvhe.o
36extra-y := $(hyp-obj) kvm_nvhe.tmp.o kvm_nvhe.rel.o hyp.lds hyp-reloc.S hyp-reloc.o
37
38# 1) Compile all source files to `.nvhe.o` object files. The file extension
39# avoids file name clashes for files shared with VHE.
40$(obj)/%.nvhe.o: $(src)/%.c FORCE
41 $(call if_changed_rule,cc_o_c)
42$(obj)/%.nvhe.o: $(src)/%.S FORCE

--- 62 unchanged lines hidden ---
30obj-y := kvm_nvhe.o
31extra-y := $(hyp-obj) kvm_nvhe.tmp.o kvm_nvhe.rel.o hyp.lds hyp-reloc.S hyp-reloc.o
32
33# 1) Compile all source files to `.nvhe.o` object files. The file extension
34# avoids file name clashes for files shared with VHE.
35$(obj)/%.nvhe.o: $(src)/%.c FORCE
36 $(call if_changed_rule,cc_o_c)
37$(obj)/%.nvhe.o: $(src)/%.S FORCE

--- 62 unchanged lines hidden ---