xref: /linux/arch/arm64/kvm/Makefile (revision 7c4f73548ed15476daf1101f66648085eda65067)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
26211753fSMarc Zyngier#
36211753fSMarc Zyngier# Makefile for Kernel-based Virtual Machine module
46211753fSMarc Zyngier#
56211753fSMarc Zyngier
6b1992c37SMasahiro Yamadaccflags-y += -I $(src)
76211753fSMarc Zyngier
8d8f6ef45SDavid Woodhouseinclude $(srctree)/virt/kvm/Makefile.kvm
96211753fSMarc Zyngier
10d82755b2SWill Deaconobj-$(CONFIG_KVM) += kvm.o
11d82755b2SWill Deaconobj-$(CONFIG_KVM) += hyp/
126211753fSMarc Zyngier
1379e06c4cSLinus Torvaldskvm-y += arm.o mmu.o mmio.o psci.o hypercalls.o pvtime.o \
1490c1f934SMarc Zyngier	 inject_fault.o va_layout.o handle_exit.o \
159f5fee05SMarc Zyngier	 guest.o debug.o reset.o sys_regs.o stacktrace.o \
1620492a62SMarc Zyngier	 vgic-sys-reg-v3.o fpsimd.o pkvm.o \
179f75b6d4SMarc Zyngier	 arch_timer.o trng.o vmid.o emulate-nested.o nested.o \
1825357de0SFuad Tabba	 vgic/vgic.o vgic/vgic-init.o \
1925357de0SFuad Tabba	 vgic/vgic-irqfd.o vgic/vgic-v2.o \
2025357de0SFuad Tabba	 vgic/vgic-v3.o vgic/vgic-v4.o \
2125357de0SFuad Tabba	 vgic/vgic-mmio.o vgic/vgic-mmio-v2.o \
2225357de0SFuad Tabba	 vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \
2325357de0SFuad Tabba	 vgic/vgic-its.o vgic/vgic-debug.o
246211753fSMarc Zyngier
2520492a62SMarc Zyngierkvm-$(CONFIG_HW_PERF_EVENTS)  += pmu-emul.o pmu.o
266ccc971eSMarc Zyngierkvm-$(CONFIG_ARM64_PTR_AUTH)  += pauth.o
27*7c4f7354SSebastian Enekvm-$(CONFIG_PTDUMP_STAGE2_DEBUGFS) += ptdump.o
28ed4ed15dSWill Deacon
29ed4ed15dSWill Deaconalways-y := hyp_constants.h hyp-constants.s
30ed4ed15dSWill Deacon
31ed4ed15dSWill Deacondefine rule_gen_hyp_constants
32ed4ed15dSWill Deacon	$(call filechk,offsets,__HYP_CONSTANTS_H__)
33ed4ed15dSWill Deaconendef
34ed4ed15dSWill Deacon
35b1992c37SMasahiro YamadaCFLAGS_hyp-constants.o = -I $(src)/hyp/include
36ed4ed15dSWill Deacon$(obj)/hyp-constants.s: $(src)/hyp/hyp-constants.c FORCE
37ed4ed15dSWill Deacon	$(call if_changed_dep,cc_s_c)
38ed4ed15dSWill Deacon
39ed4ed15dSWill Deacon$(obj)/hyp_constants.h: $(obj)/hyp-constants.s FORCE
40ed4ed15dSWill Deacon	$(call if_changed_rule,gen_hyp_constants)
41ed4ed15dSWill Deacon
42ed4ed15dSWill Deaconobj-kvm := $(addprefix $(obj)/, $(kvm-y))
43ed4ed15dSWill Deacon$(obj-kvm): $(obj)/hyp_constants.h
44