blob: 6646c952c5e37a80c19d4d86296e7bbdc0e2f3ad [file] [log] [blame]
Hollis Blanchardbbf45ba2008-04-16 23:28:09 -05001#
2# Makefile for Kernel-based Virtual Machine module
3#
4
Michael Ellermanba55bd72009-06-09 20:48:51 +00005subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
6
matt mooney4108d9b2010-09-22 20:51:09 +00007ccflags-y := -Ivirt/kvm -Iarch/powerpc/kvm
Marc Zyngier535cf7b2013-05-14 14:31:02 +01008KVM := ../../../virt/kvm
Hollis Blanchardbbf45ba2008-04-16 23:28:09 -05009
Marc Zyngier535cf7b2013-05-14 14:31:02 +010010common-objs-y = $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \
11 $(KVM)/eventfd.o
Hollis Blanchardbbf45ba2008-04-16 23:28:09 -050012
Marcelo Tosatti46f43c62009-06-18 11:47:27 -030013CFLAGS_44x_tlb.o := -I.
Alexander Grafb71c9e22013-01-11 15:22:45 +010014CFLAGS_e500_mmu.o := -I.
15CFLAGS_e500_mmu_host.o := -I.
Marcelo Tosatti46f43c62009-06-18 11:47:27 -030016CFLAGS_emulate.o := -I.
17
Alexander Grafc4f9c772009-10-30 05:47:24 +000018common-objs-y += powerpc.o emulate.o
Hollis Blanchard73e75b42008-12-02 15:51:57 -060019obj-$(CONFIG_KVM_EXIT_TIMING) += timing.o
Alexander Grafc14dea02010-04-16 00:11:41 +020020obj-$(CONFIG_KVM_BOOK3S_HANDLER) += book3s_exports.o
Hollis Blanchardbbf45ba2008-04-16 23:28:09 -050021
22AFLAGS_booke_interrupts.o := -I$(obj)
23
Hollis Blanchard75f74f02008-11-05 09:36:16 -060024kvm-440-objs := \
Alexander Grafc4f9c772009-10-30 05:47:24 +000025 $(common-objs-y) \
Hollis Blanchard75f74f02008-11-05 09:36:16 -060026 booke.o \
Hollis Blanchardd0c7dc02009-01-03 16:23:06 -060027 booke_emulate.o \
Hollis Blanchard75f74f02008-11-05 09:36:16 -060028 booke_interrupts.o \
29 44x.o \
30 44x_tlb.o \
31 44x_emulate.o
Alexander Grafc4f9c772009-10-30 05:47:24 +000032kvm-objs-$(CONFIG_KVM_440) := $(kvm-440-objs)
Hollis Blanchardbc8080c2009-01-03 16:23:10 -060033
34kvm-e500-objs := \
Alexander Grafc4f9c772009-10-30 05:47:24 +000035 $(common-objs-y) \
Hollis Blanchardbc8080c2009-01-03 16:23:10 -060036 booke.o \
37 booke_emulate.o \
38 booke_interrupts.o \
39 e500.o \
Alexander Grafb71c9e22013-01-11 15:22:45 +010040 e500_mmu.o \
41 e500_mmu_host.o \
Hollis Blanchardbc8080c2009-01-03 16:23:10 -060042 e500_emulate.o
Alexander Grafbf7ca4b2012-02-15 23:40:00 +000043kvm-objs-$(CONFIG_KVM_E500V2) := $(kvm-e500-objs)
Alexander Grafc4f9c772009-10-30 05:47:24 +000044
Scott Wood73196cd2011-12-20 15:34:47 +000045kvm-e500mc-objs := \
46 $(common-objs-y) \
47 booke.o \
48 booke_emulate.o \
49 bookehv_interrupts.o \
50 e500mc.o \
Alexander Grafb71c9e22013-01-11 15:22:45 +010051 e500_mmu.o \
52 e500_mmu_host.o \
Scott Wood73196cd2011-12-20 15:34:47 +000053 e500_emulate.o
54kvm-objs-$(CONFIG_KVM_E500MC) := $(kvm-e500mc-objs)
55
Paul Mackerrasde56a942011-06-29 00:21:34 +000056kvm-book3s_64-objs-$(CONFIG_KVM_BOOK3S_64_PR) := \
Marc Zyngier535cf7b2013-05-14 14:31:02 +010057 $(KVM)/coalesced_mmio.o \
Alexander Graf963cf3d2010-02-19 11:00:40 +010058 fpu.o \
Alexander Graf831317b2010-02-19 11:00:44 +010059 book3s_paired_singles.o \
Paul Mackerrasf05ed4d2011-06-29 00:17:58 +000060 book3s_pr.o \
Alexander Graf0254f0742011-08-08 17:21:15 +020061 book3s_pr_papr.o \
Benjamin Herrenschmidtf31e65e2012-03-15 21:58:34 +000062 book3s_64_vio_hv.o \
Alexander Graf2191d652010-04-16 00:11:32 +020063 book3s_emulate.o \
64 book3s_interrupts.o \
Alexander Graffef093be2010-06-30 15:18:46 +020065 book3s_mmu_hpte.o \
Alexander Grafc4f9c772009-10-30 05:47:24 +000066 book3s_64_mmu_host.o \
67 book3s_64_mmu.o \
68 book3s_32_mmu.o
Paul Mackerras177339d2011-07-23 17:41:11 +100069kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_PR) := \
70 book3s_rmhandlers.o
Paul Mackerrasde56a942011-06-29 00:21:34 +000071
72kvm-book3s_64-objs-$(CONFIG_KVM_BOOK3S_64_HV) := \
73 book3s_hv.o \
74 book3s_hv_interrupts.o \
75 book3s_64_mmu_hv.o
Benjamin Herrenschmidte7d26f22013-04-17 20:31:15 +000076kvm-book3s_64-builtin-xics-objs-$(CONFIG_KVM_XICS) := \
77 book3s_hv_rm_xics.o
Paul Mackerrasa8606e22011-06-29 00:22:05 +000078kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HV) := \
Paul Mackerras177339d2011-07-23 17:41:11 +100079 book3s_hv_rmhandlers.o \
David Gibson54738c02011-06-29 00:22:41 +000080 book3s_hv_rm_mmu.o \
Paul Mackerrasaa04b4c2011-06-29 00:25:44 +000081 book3s_64_vio_hv.o \
Paul Mackerrasb4072df2012-11-23 22:37:50 +000082 book3s_hv_ras.o \
Benjamin Herrenschmidte7d26f22013-04-17 20:31:15 +000083 book3s_hv_builtin.o \
Aneesh Kumar K.Vfa61a4e2013-07-02 11:15:16 +053084 book3s_hv_cma.o \
Benjamin Herrenschmidte7d26f22013-04-17 20:31:15 +000085 $(kvm-book3s_64-builtin-xics-objs-y)
Paul Mackerrasde56a942011-06-29 00:21:34 +000086
Benjamin Herrenschmidtbc5ad3f2013-04-17 20:30:26 +000087kvm-book3s_64-objs-$(CONFIG_KVM_XICS) += \
88 book3s_xics.o
89
Paul Mackerrasa8606e22011-06-29 00:22:05 +000090kvm-book3s_64-module-objs := \
Marc Zyngier535cf7b2013-05-14 14:31:02 +010091 $(KVM)/kvm_main.o \
92 $(KVM)/eventfd.o \
Paul Mackerrasde56a942011-06-29 00:21:34 +000093 powerpc.o \
94 emulate.o \
95 book3s.o \
Benjamin Herrenschmidtf31e65e2012-03-15 21:58:34 +000096 book3s_64_vio.o \
Michael Ellerman8e591cb2013-04-17 20:30:00 +000097 book3s_rtas.o \
Paul Mackerrasde56a942011-06-29 00:21:34 +000098 $(kvm-book3s_64-objs-y)
Paul Mackerrasa8606e22011-06-29 00:22:05 +000099
100kvm-objs-$(CONFIG_KVM_BOOK3S_64) := $(kvm-book3s_64-module-objs)
Alexander Grafc4f9c772009-10-30 05:47:24 +0000101
Alexander Graf4f841392010-04-16 00:11:58 +0200102kvm-book3s_32-objs := \
103 $(common-objs-y) \
104 fpu.o \
105 book3s_paired_singles.o \
106 book3s.o \
Paul Mackerrasf05ed4d2011-06-29 00:17:58 +0000107 book3s_pr.o \
Alexander Graf4f841392010-04-16 00:11:58 +0200108 book3s_emulate.o \
109 book3s_interrupts.o \
Alexander Graffef093be2010-06-30 15:18:46 +0200110 book3s_mmu_hpte.o \
Alexander Graf4f841392010-04-16 00:11:58 +0200111 book3s_32_mmu_host.o \
112 book3s_32_mmu.o
113kvm-objs-$(CONFIG_KVM_BOOK3S_32) := $(kvm-book3s_32-objs)
114
Scott Wood5df554a2013-04-12 14:08:46 +0000115kvm-objs-$(CONFIG_KVM_MPIC) += mpic.o
Marc Zyngier535cf7b2013-05-14 14:31:02 +0100116kvm-objs-$(CONFIG_HAVE_KVM_IRQ_ROUTING) += $(KVM)/irqchip.o
Scott Wood5df554a2013-04-12 14:08:46 +0000117
Alexander Grafc4f9c772009-10-30 05:47:24 +0000118kvm-objs := $(kvm-objs-m) $(kvm-objs-y)
119
120obj-$(CONFIG_KVM_440) += kvm.o
Alexander Grafbf7ca4b2012-02-15 23:40:00 +0000121obj-$(CONFIG_KVM_E500V2) += kvm.o
Scott Wood73196cd2011-12-20 15:34:47 +0000122obj-$(CONFIG_KVM_E500MC) += kvm.o
Alexander Grafc4f9c772009-10-30 05:47:24 +0000123obj-$(CONFIG_KVM_BOOK3S_64) += kvm.o
Alexander Graf4f841392010-04-16 00:11:58 +0200124obj-$(CONFIG_KVM_BOOK3S_32) += kvm.o
Alexander Grafc4f9c772009-10-30 05:47:24 +0000125
Paul Mackerrasa8606e22011-06-29 00:22:05 +0000126obj-y += $(kvm-book3s_64-builtin-objs-y)