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