Makefile 2.8 KB
Newer Older
1 2 3 4
#
# Makefile for Kernel-based Virtual Machine module
#

5 6
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror

7
ccflags-y := -Ivirt/kvm -Iarch/powerpc/kvm
8
KVM := ../../../virt/kvm
9

10
common-objs-y = $(KVM)/kvm_main.o $(KVM)/eventfd.o
11
common-objs-$(CONFIG_KVM_VFIO) += $(KVM)/vfio.o
12
common-objs-$(CONFIG_KVM_MMIO) += $(KVM)/coalesced_mmio.o
13

14 15
CFLAGS_e500_mmu.o := -I.
CFLAGS_e500_mmu_host.o := -I.
16
CFLAGS_emulate.o  := -I.
17
CFLAGS_emulate_loadstore.o  := -I.
18

19
common-objs-y += powerpc.o emulate_loadstore.o
20
obj-$(CONFIG_KVM_EXIT_TIMING) += timing.o
21
obj-$(CONFIG_KVM_BOOK3S_HANDLER) += book3s_exports.o
22

23
AFLAGS_booke_interrupts.o := -I$(objtree)/$(obj)
24

25
kvm-e500-objs := \
26
	$(common-objs-y) \
27
	emulate.o \
28 29 30 31
	booke.o \
	booke_emulate.o \
	booke_interrupts.o \
	e500.o \
32 33
	e500_mmu.o \
	e500_mmu_host.o \
34
	e500_emulate.o
35
kvm-objs-$(CONFIG_KVM_E500V2) := $(kvm-e500-objs)
36

S
Scott Wood 已提交
37 38
kvm-e500mc-objs := \
	$(common-objs-y) \
39
	emulate.o \
S
Scott Wood 已提交
40 41 42 43
	booke.o \
	booke_emulate.o \
	bookehv_interrupts.o \
	e500mc.o \
44 45
	e500_mmu.o \
	e500_mmu_host.o \
S
Scott Wood 已提交
46 47 48
	e500_emulate.o
kvm-objs-$(CONFIG_KVM_E500MC) := $(kvm-e500mc-objs)

49 50 51
kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) := \
	book3s_64_vio_hv.o

52
kvm-pr-y := \
53
	fpu.o \
54
	emulate.o \
55
	book3s_paired_singles.o \
56
	book3s_pr.o \
57
	book3s_pr_papr.o \
58 59
	book3s_emulate.o \
	book3s_interrupts.o \
60
	book3s_mmu_hpte.o \
61 62 63
	book3s_64_mmu_host.o \
	book3s_64_mmu.o \
	book3s_32_mmu.o
64

65 66
ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \
67
	book3s_rmhandlers.o
68
endif
69

70
kvm-hv-y += \
71 72 73
	book3s_hv.o \
	book3s_hv_interrupts.o \
	book3s_64_mmu_hv.o
74

75 76
kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \
	book3s_hv_rm_xics.o
77

78 79
ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \
80
	book3s_hv_rmhandlers.o \
81
	book3s_hv_rm_mmu.o \
82
	book3s_hv_ras.o \
83 84
	book3s_hv_builtin.o \
	$(kvm-book3s_64-builtin-xics-objs-y)
85
endif
86

87 88 89
kvm-book3s_64-objs-$(CONFIG_KVM_XICS) += \
	book3s_xics.o

90 91
kvm-book3s_64-module-objs := \
	$(common-objs-y) \
92
	book3s.o \
93
	book3s_64_vio.o \
94
	book3s_rtas.o \
95
	$(kvm-book3s_64-objs-y)
96 97

kvm-objs-$(CONFIG_KVM_BOOK3S_64) := $(kvm-book3s_64-module-objs)
98

99 100
kvm-book3s_32-objs := \
	$(common-objs-y) \
101
	emulate.o \
102 103 104
	fpu.o \
	book3s_paired_singles.o \
	book3s.o \
105
	book3s_pr.o \
106 107
	book3s_emulate.o \
	book3s_interrupts.o \
108
	book3s_mmu_hpte.o \
109 110 111 112
	book3s_32_mmu_host.o \
	book3s_32_mmu.o
kvm-objs-$(CONFIG_KVM_BOOK3S_32) := $(kvm-book3s_32-objs)

113
kvm-objs-$(CONFIG_KVM_MPIC) += mpic.o
114
kvm-objs-$(CONFIG_HAVE_KVM_IRQ_ROUTING) += $(KVM)/irqchip.o
115

116 117
kvm-objs := $(kvm-objs-m) $(kvm-objs-y)

118
obj-$(CONFIG_KVM_E500V2) += kvm.o
S
Scott Wood 已提交
119
obj-$(CONFIG_KVM_E500MC) += kvm.o
120
obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o
121
obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o
122

123 124 125
obj-$(CONFIG_KVM_BOOK3S_64_PR) += kvm-pr.o
obj-$(CONFIG_KVM_BOOK3S_64_HV) += kvm-hv.o

126
obj-y += $(kvm-book3s_64-builtin-objs-y)