Makefile 2.7 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 16
CFLAGS_emulate.o  := -I.

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

AFLAGS_booke_interrupts.o := -I$(obj)

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

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

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

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

60 61 62 63 64
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) += \
65
	book3s_rmhandlers.o
66
endif
67

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

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

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

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

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

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

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

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

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

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

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

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