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)/eventfd.o 11common-objs-$(CONFIG_KVM_VFIO) += $(KVM)/vfio.o 12common-objs-$(CONFIG_KVM_MMIO) += $(KVM)/coalesced_mmio.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_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 emulate.o \ 28 booke.o \ 29 booke_emulate.o \ 30 booke_interrupts.o \ 31 e500.o \ 32 e500_mmu.o \ 33 e500_mmu_host.o \ 34 e500_emulate.o 35kvm-objs-$(CONFIG_KVM_E500V2) := $(kvm-e500-objs) 36 37kvm-e500mc-objs := \ 38 $(common-objs-y) \ 39 emulate.o \ 40 booke.o \ 41 booke_emulate.o \ 42 bookehv_interrupts.o \ 43 e500mc.o \ 44 e500_mmu.o \ 45 e500_mmu_host.o \ 46 e500_emulate.o 47kvm-objs-$(CONFIG_KVM_E500MC) := $(kvm-e500mc-objs) 48 49kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) := \ 50 book3s_64_vio_hv.o 51 52kvm-pr-y := \ 53 fpu.o \ 54 emulate.o \ 55 book3s_paired_singles.o \ 56 book3s_pr.o \ 57 book3s_pr_papr.o \ 58 book3s_emulate.o \ 59 book3s_interrupts.o \ 60 book3s_mmu_hpte.o \ 61 book3s_64_mmu_host.o \ 62 book3s_64_mmu.o \ 63 book3s_32_mmu.o 64 65ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE 66kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \ 67 book3s_rmhandlers.o 68endif 69 70kvm-hv-y += \ 71 book3s_hv.o \ 72 book3s_hv_interrupts.o \ 73 book3s_64_mmu_hv.o 74 75kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \ 76 book3s_hv_rm_xics.o 77 78ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE 79kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \ 80 book3s_hv_hmi.o \ 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 $(common-objs-y) \ 93 book3s.o \ 94 book3s_64_vio.o \ 95 book3s_rtas.o \ 96 $(kvm-book3s_64-objs-y) 97 98kvm-objs-$(CONFIG_KVM_BOOK3S_64) := $(kvm-book3s_64-module-objs) 99 100kvm-book3s_32-objs := \ 101 $(common-objs-y) \ 102 emulate.o \ 103 fpu.o \ 104 book3s_paired_singles.o \ 105 book3s.o \ 106 book3s_pr.o \ 107 book3s_emulate.o \ 108 book3s_interrupts.o \ 109 book3s_mmu_hpte.o \ 110 book3s_32_mmu_host.o \ 111 book3s_32_mmu.o 112kvm-objs-$(CONFIG_KVM_BOOK3S_32) := $(kvm-book3s_32-objs) 113 114kvm-objs-$(CONFIG_KVM_MPIC) += mpic.o 115kvm-objs-$(CONFIG_HAVE_KVM_IRQ_ROUTING) += $(KVM)/irqchip.o 116 117kvm-objs := $(kvm-objs-m) $(kvm-objs-y) 118 119obj-$(CONFIG_KVM_E500V2) += kvm.o 120obj-$(CONFIG_KVM_E500MC) += kvm.o 121obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o 122obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o 123 124obj-$(CONFIG_KVM_BOOK3S_64_PR) += kvm-pr.o 125obj-$(CONFIG_KVM_BOOK3S_64_HV) += kvm-hv.o 126 127obj-y += $(kvm-book3s_64-builtin-objs-y) 128