1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 26211753fSMarc Zyngier# 36211753fSMarc Zyngier# Makefile for Kernel-based Virtual Machine module 46211753fSMarc Zyngier# 56211753fSMarc Zyngier 69ed24f4bSMarc Zyngierccflags-y += -I $(srctree)/$(src) 76211753fSMarc Zyngier 86211753fSMarc ZyngierKVM=../../../virt/kvm 96211753fSMarc Zyngier 10d82755b2SWill Deaconobj-$(CONFIG_KVM) += kvm.o 11d82755b2SWill Deaconobj-$(CONFIG_KVM) += hyp/ 126211753fSMarc Zyngier 1325357de0SFuad Tabbakvm-y := $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o $(KVM)/eventfd.o \ 14cb082bfaSJing Zhang $(KVM)/vfio.o $(KVM)/irqchip.o $(KVM)/binary_stats.o \ 1525357de0SFuad Tabba arm.o mmu.o mmio.o psci.o perf.o hypercalls.o pvtime.o \ 1690c1f934SMarc Zyngier inject_fault.o va_layout.o handle_exit.o \ 17750ed566SJames Morse guest.o debug.o reset.o sys_regs.o \ 1825357de0SFuad Tabba vgic-sys-reg-v3.o fpsimd.o pmu.o \ 19a8e190cdSArd Biesheuvel arch_timer.o trng.o\ 2025357de0SFuad Tabba vgic/vgic.o vgic/vgic-init.o \ 2125357de0SFuad Tabba vgic/vgic-irqfd.o vgic/vgic-v2.o \ 2225357de0SFuad Tabba vgic/vgic-v3.o vgic/vgic-v4.o \ 2325357de0SFuad Tabba vgic/vgic-mmio.o vgic/vgic-mmio-v2.o \ 2425357de0SFuad Tabba vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \ 2525357de0SFuad Tabba vgic/vgic-its.o vgic/vgic-debug.o 266211753fSMarc Zyngier 278cbebc41SMarc Zyngierkvm-$(CONFIG_HW_PERF_EVENTS) += pmu-emul.o 28*ed4ed15dSWill Deacon 29*ed4ed15dSWill Deaconalways-y := hyp_constants.h hyp-constants.s 30*ed4ed15dSWill Deacon 31*ed4ed15dSWill Deacondefine rule_gen_hyp_constants 32*ed4ed15dSWill Deacon $(call filechk,offsets,__HYP_CONSTANTS_H__) 33*ed4ed15dSWill Deaconendef 34*ed4ed15dSWill Deacon 35*ed4ed15dSWill DeaconCFLAGS_hyp-constants.o = -I $(srctree)/$(src)/hyp/include 36*ed4ed15dSWill Deacon$(obj)/hyp-constants.s: $(src)/hyp/hyp-constants.c FORCE 37*ed4ed15dSWill Deacon $(call if_changed_dep,cc_s_c) 38*ed4ed15dSWill Deacon 39*ed4ed15dSWill Deacon$(obj)/hyp_constants.h: $(obj)/hyp-constants.s FORCE 40*ed4ed15dSWill Deacon $(call if_changed_rule,gen_hyp_constants) 41*ed4ed15dSWill Deacon 42*ed4ed15dSWill Deaconobj-kvm := $(addprefix $(obj)/, $(kvm-y)) 43*ed4ed15dSWill Deacon$(obj-kvm): $(obj)/hyp_constants.h 44