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