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)/coalesced_mmio.o \
11
		$(KVM)/eventfd.o $(KVM)/vfio.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
	emulate.o \
52
	book3s_paired_singles.o \
53
	book3s_pr.o \
54
	book3s_pr_papr.o \
55 56
	book3s_emulate.o \
	book3s_interrupts.o \
57
	book3s_mmu_hpte.o \
58 59 60
	book3s_64_mmu_host.o \
	book3s_64_mmu.o \
	book3s_32_mmu.o
61

62 63 64 65 66
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) += \
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
kvm-book3s_64-module-objs += \
91 92
	$(KVM)/kvm_main.o \
	$(KVM)/eventfd.o \
93
	powerpc.o \
94
	emulate_loadstore.o \
95
	book3s.o \
96
	book3s_64_vio.o \
97
	book3s_rtas.o \
98
	$(kvm-book3s_64-objs-y)
99 100

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

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

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

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

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

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

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