1# SPDX-License-Identifier: GPL-2.0 2# 3# Makefile for Kernel-based Virtual Machine module 4# 5 6subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror 7 8ccflags-y := -Ivirt/kvm -Iarch/powerpc/kvm 9KVM := ../../../virt/kvm 10 11common-objs-y = $(KVM)/kvm_main.o $(KVM)/eventfd.o 12common-objs-$(CONFIG_KVM_VFIO) += $(KVM)/vfio.o 13common-objs-$(CONFIG_KVM_MMIO) += $(KVM)/coalesced_mmio.o 14 15CFLAGS_e500_mmu.o := -I. 16CFLAGS_e500_mmu_host.o := -I. 17CFLAGS_emulate.o := -I. 18CFLAGS_emulate_loadstore.o := -I. 19 20common-objs-y += powerpc.o emulate_loadstore.o 21obj-$(CONFIG_KVM_EXIT_TIMING) += timing.o 22obj-$(CONFIG_KVM_BOOK3S_HANDLER) += book3s_exports.o 23 24AFLAGS_booke_interrupts.o := -I$(objtree)/$(obj) 25 26kvm-e500-objs := \ 27 $(common-objs-y) \ 28 emulate.o \ 29 booke.o \ 30 booke_emulate.o \ 31 booke_interrupts.o \ 32 e500.o \ 33 e500_mmu.o \ 34 e500_mmu_host.o \ 35 e500_emulate.o 36kvm-objs-$(CONFIG_KVM_E500V2) := $(kvm-e500-objs) 37 38kvm-e500mc-objs := \ 39 $(common-objs-y) \ 40 emulate.o \ 41 booke.o \ 42 booke_emulate.o \ 43 bookehv_interrupts.o \ 44 e500mc.o \ 45 e500_mmu.o \ 46 e500_mmu_host.o \ 47 e500_emulate.o 48kvm-objs-$(CONFIG_KVM_E500MC) := $(kvm-e500mc-objs) 49 50kvm-book3s_64-builtin-objs-$(CONFIG_SPAPR_TCE_IOMMU) := \ 51 book3s_64_vio_hv.o 52 53kvm-pr-y := \ 54 fpu.o \ 55 emulate.o \ 56 book3s_paired_singles.o \ 57 book3s_pr.o \ 58 book3s_pr_papr.o \ 59 book3s_emulate.o \ 60 book3s_interrupts.o \ 61 book3s_mmu_hpte.o \ 62 book3s_64_mmu_host.o \ 63 book3s_64_mmu.o \ 64 book3s_32_mmu.o 65 66ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE 67kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \ 68 book3s_rmhandlers.o 69endif 70 71kvm-hv-y += \ 72 book3s_hv.o \ 73 book3s_hv_interrupts.o \ 74 book3s_64_mmu_hv.o \ 75 book3s_64_mmu_radix.o 76 77kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \ 78 book3s_hv_rm_xics.o book3s_hv_rm_xive.o 79 80ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE 81kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \ 82 book3s_hv_hmi.o \ 83 book3s_hv_rmhandlers.o \ 84 book3s_hv_rm_mmu.o \ 85 book3s_hv_ras.o \ 86 book3s_hv_builtin.o \ 87 $(kvm-book3s_64-builtin-xics-objs-y) 88endif 89 90kvm-book3s_64-objs-$(CONFIG_KVM_XICS) += \ 91 book3s_xics.o 92 93kvm-book3s_64-objs-$(CONFIG_KVM_XIVE) += book3s_xive.o 94kvm-book3s_64-objs-$(CONFIG_SPAPR_TCE_IOMMU) += book3s_64_vio.o 95 96kvm-book3s_64-module-objs := \ 97 $(common-objs-y) \ 98 book3s.o \ 99 book3s_rtas.o \ 100 $(kvm-book3s_64-objs-y) 101 102kvm-objs-$(CONFIG_KVM_BOOK3S_64) := $(kvm-book3s_64-module-objs) 103 104kvm-book3s_32-objs := \ 105 $(common-objs-y) \ 106 emulate.o \ 107 fpu.o \ 108 book3s_paired_singles.o \ 109 book3s.o \ 110 book3s_pr.o \ 111 book3s_emulate.o \ 112 book3s_interrupts.o \ 113 book3s_mmu_hpte.o \ 114 book3s_32_mmu_host.o \ 115 book3s_32_mmu.o 116kvm-objs-$(CONFIG_KVM_BOOK3S_32) := $(kvm-book3s_32-objs) 117 118kvm-objs-$(CONFIG_KVM_MPIC) += mpic.o 119kvm-objs-$(CONFIG_HAVE_KVM_IRQ_ROUTING) += $(KVM)/irqchip.o 120 121kvm-objs := $(kvm-objs-m) $(kvm-objs-y) 122 123obj-$(CONFIG_KVM_E500V2) += kvm.o 124obj-$(CONFIG_KVM_E500MC) += kvm.o 125obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o 126obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o 127 128obj-$(CONFIG_KVM_BOOK3S_64_PR) += kvm-pr.o 129obj-$(CONFIG_KVM_BOOK3S_64_HV) += kvm-hv.o 130 131obj-y += $(kvm-book3s_64-builtin-objs-y) 132