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 11
common-objs-y = $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \
		$(KVM)/eventfd.o
12

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

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

AFLAGS_booke_interrupts.o := -I$(obj)

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

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

46 47 48
kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) := \
	book3s_64_vio_hv.o

49
kvm-pr-y := \
50
	fpu.o \
51
	book3s_paired_singles.o \
52
	book3s_pr.o \
53
	book3s_pr_papr.o \
54 55
	book3s_emulate.o \
	book3s_interrupts.o \
56
	book3s_mmu_hpte.o \
57 58 59
	book3s_64_mmu_host.o \
	book3s_64_mmu.o \
	book3s_32_mmu.o
60

61 62 63 64 65
ifdef CONFIG_KVM_BOOK3S_PR_POSSIBLE
kvm-book3s_64-module-objs := \
	$(KVM)/coalesced_mmio.o

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

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

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

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

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

90
kvm-book3s_64-module-objs += \
91 92
	$(KVM)/kvm_main.o \
	$(KVM)/eventfd.o \
93 94
	powerpc.o \
	emulate.o \
95
	emulate_loadstore.o \
96
	book3s.o \
97
	book3s_64_vio.o \
98
	book3s_rtas.o \
99
	$(kvm-book3s_64-objs-y)
100 101

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

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

116
kvm-objs-$(CONFIG_KVM_MPIC) += mpic.o
117
kvm-objs-$(CONFIG_HAVE_KVM_IRQ_ROUTING) += $(KVM)/irqchip.o
118

119 120
kvm-objs := $(kvm-objs-m) $(kvm-objs-y)

121
obj-$(CONFIG_KVM_E500V2) += kvm.o
S
Scott Wood 已提交
122
obj-$(CONFIG_KVM_E500MC) += kvm.o
123
obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o
124
obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o
125

126 127 128
obj-$(CONFIG_KVM_BOOK3S_64_PR) += kvm-pr.o
obj-$(CONFIG_KVM_BOOK3S_64_HV) += kvm-hv.o

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