Makefile 2.9 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
CFLAGS_44x_tlb.o  := -I.
14 15
CFLAGS_e500_mmu.o := -I.
CFLAGS_e500_mmu_host.o := -I.
16 17
CFLAGS_emulate.o  := -I.

18
common-objs-y += powerpc.o emulate.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-440-objs := \
25
	$(common-objs-y) \
26
	booke.o \
27
	booke_emulate.o \
28 29 30 31
	booke_interrupts.o \
	44x.o \
	44x_tlb.o \
	44x_emulate.o
32
kvm-objs-$(CONFIG_KVM_440) := $(kvm-440-objs)
33 34

kvm-e500-objs := \
35
	$(common-objs-y) \
36 37 38 39
	booke.o \
	booke_emulate.o \
	booke_interrupts.o \
	e500.o \
40 41
	e500_mmu.o \
	e500_mmu_host.o \
42
	e500_emulate.o
43
kvm-objs-$(CONFIG_KVM_E500V2) := $(kvm-e500-objs)
44

S
Scott Wood 已提交
45 46 47 48 49 50
kvm-e500mc-objs := \
	$(common-objs-y) \
	booke.o \
	booke_emulate.o \
	bookehv_interrupts.o \
	e500mc.o \
51 52
	e500_mmu.o \
	e500_mmu_host.o \
S
Scott Wood 已提交
53 54 55
	e500_emulate.o
kvm-objs-$(CONFIG_KVM_E500MC) := $(kvm-e500mc-objs)

56 57 58
kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) := \
	book3s_64_vio_hv.o

59
kvm-pr-y := \
60
	fpu.o \
61
	book3s_paired_singles.o \
62
	book3s_pr.o \
63
	book3s_pr_papr.o \
64 65
	book3s_emulate.o \
	book3s_interrupts.o \
66
	book3s_mmu_hpte.o \
67 68 69
	book3s_64_mmu_host.o \
	book3s_64_mmu.o \
	book3s_32_mmu.o
70

71 72 73 74 75
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) += \
76
	book3s_rmhandlers.o
77
endif
78

79
kvm-hv-y += \
80 81 82
	book3s_hv.o \
	book3s_hv_interrupts.o \
	book3s_64_mmu_hv.o
83

84 85
kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \
	book3s_hv_rm_xics.o
86

87 88
ifdef CONFIG_KVM_BOOK3S_HV_POSSIBLE
kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) += \
89
	book3s_hv_rmhandlers.o \
90
	book3s_hv_rm_mmu.o \
91
	book3s_hv_ras.o \
92 93
	book3s_hv_builtin.o \
	$(kvm-book3s_64-builtin-xics-objs-y)
94
endif
95

96 97 98
kvm-book3s_64-objs-$(CONFIG_KVM_XICS) += \
	book3s_xics.o

99
kvm-book3s_64-module-objs += \
100 101
	$(KVM)/kvm_main.o \
	$(KVM)/eventfd.o \
102 103 104
	powerpc.o \
	emulate.o \
	book3s.o \
105
	book3s_64_vio.o \
106
	book3s_rtas.o \
107
	$(kvm-book3s_64-objs-y)
108 109

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

111 112 113 114 115
kvm-book3s_32-objs := \
	$(common-objs-y) \
	fpu.o \
	book3s_paired_singles.o \
	book3s.o \
116
	book3s_pr.o \
117 118
	book3s_emulate.o \
	book3s_interrupts.o \
119
	book3s_mmu_hpte.o \
120 121 122 123
	book3s_32_mmu_host.o \
	book3s_32_mmu.o
kvm-objs-$(CONFIG_KVM_BOOK3S_32) := $(kvm-book3s_32-objs)

124
kvm-objs-$(CONFIG_KVM_MPIC) += mpic.o
125
kvm-objs-$(CONFIG_HAVE_KVM_IRQ_ROUTING) += $(KVM)/irqchip.o
126

127 128 129
kvm-objs := $(kvm-objs-m) $(kvm-objs-y)

obj-$(CONFIG_KVM_440) += kvm.o
130
obj-$(CONFIG_KVM_E500V2) += kvm.o
S
Scott Wood 已提交
131
obj-$(CONFIG_KVM_E500MC) += kvm.o
132
obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o
133
obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o
134

135 136 137
obj-$(CONFIG_KVM_BOOK3S_64_PR) += kvm-pr.o
obj-$(CONFIG_KVM_BOOK3S_64_HV) += kvm-hv.o

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