1# SPDX-License-Identifier: GPL-2.0 2# 3# Makefile for Kernel-based Virtual Machine module 4# 5 6ccflags-y += -I $(src) 7 8include $(srctree)/virt/kvm/Makefile.kvm 9 10obj-$(CONFIG_KVM) += kvm.o 11obj-$(CONFIG_KVM) += hyp/ 12 13CFLAGS_sys_regs.o += -Wno-override-init 14CFLAGS_handle_exit.o += -Wno-override-init 15 16kvm-y += arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \ 17 inject_fault.o va_layout.o handle_exit.o \ 18 guest.o debug.o reset.o sys_regs.o stacktrace.o \ 19 vgic-sys-reg-v3.o fpsimd.o pkvm.o \ 20 arch_timer.o trng.o vmid.o emulate-nested.o nested.o at.o \ 21 vgic/vgic.o vgic/vgic-init.o \ 22 vgic/vgic-irqfd.o vgic/vgic-v2.o \ 23 vgic/vgic-v3.o vgic/vgic-v4.o \ 24 vgic/vgic-mmio.o vgic/vgic-mmio-v2.o \ 25 vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \ 26 vgic/vgic-its.o vgic/vgic-debug.o 27 28kvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o pmu.o 29kvm-$(CONFIG_ARM64_PTR_AUTH) += pauth.o 30kvm-$(CONFIG_PTDUMP_STAGE2_DEBUGFS) += ptdump.o 31 32always-y := hyp_constants.h hyp-constants.s 33 34define rule_gen_hyp_constants 35 $(call filechk,offsets,__HYP_CONSTANTS_H__) 36endef 37 38CFLAGS_hyp-constants.o = -I $(src)/hyp/include 39$(obj)/hyp-constants.s: $(src)/hyp/hyp-constants.c FORCE 40 $(call if_changed_dep,cc_s_c) 41 42$(obj)/hyp_constants.h: $(obj)/hyp-constants.s FORCE 43 $(call if_changed_rule,gen_hyp_constants) 44 45obj-kvm := $(addprefix $(obj)/, $(kvm-y)) 46$(obj-kvm): $(obj)/hyp_constants.h 47