blob: 30f244b6452349388d0c7fd50a74188d31f0316d [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Avi Kivityedf88412007-12-16 11:02:48 +02002
Siddharth Chandrasekaran6fb30842021-03-24 13:43:47 +01003ccflags-y += -I $(srctree)/arch/x86/kvm
Paolo Bonzini4f337fa2020-02-28 10:42:31 +01004ccflags-$(CONFIG_KVM_WERROR) += -Werror
Avi Kivityedf88412007-12-16 11:02:48 +02005
Josh Poimboeuf7f4b5cd2020-04-20 11:17:37 -05006ifeq ($(CONFIG_FRAME_POINTER),y)
7OBJECT_FILES_NON_STANDARD_vmenter.o := y
8endif
9
David Woodhouse6f2cdbd2021-11-21 12:54:41 +000010include $(srctree)/virt/kvm/Makefile.kvm
Christoph Hellwig284e9b02009-05-18 08:16:14 -040011
Paolo Bonzinib59b1532021-02-26 04:54:45 -050012kvm-y += x86.o emulate.o i8259.o irq.o lapic.o \
Andrey Smetanine83d5882015-07-03 15:01:34 +030013 i8254.o ioapic.o irq_comm.o cpuid.o pmu.o mtrr.o \
Paolo Bonzini5a9624a2020-10-16 10:29:37 -040014 hyperv.o debugfs.o mmu/mmu.o mmu/page_track.o \
Paolo Bonzini897218f2021-02-06 09:53:33 -050015 mmu/spte.o
Vineeth Pillai3c86c0d2021-06-03 15:14:36 +000016
17ifdef CONFIG_HYPERV
18kvm-y += kvm_onhyperv.o
19endif
20
Paolo Bonzini897218f2021-02-06 09:53:33 -050021kvm-$(CONFIG_X86_64) += mmu/tdp_iter.o mmu/tdp_mmu.o
Paolo Bonzinib59b1532021-02-26 04:54:45 -050022kvm-$(CONFIG_KVM_XEN) += xen.o
Andrey Smetanine83d5882015-07-03 15:01:34 +030023
Xiaoyao Li8888cdd2020-09-23 11:31:11 -070024kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \
25 vmx/evmcs.o vmx/nested.o vmx/posted_intr.o
Sean Christopherson9798adb2021-04-12 16:21:38 +120026kvm-intel-$(CONFIG_X86_SGX_KVM) += vmx/sgx.o
27
Uros Bizjak199cd1d2020-03-30 15:02:13 +020028kvm-amd-y += svm/svm.o svm/vmenter.o svm/pmu.o svm/nested.o svm/avic.o svm/sev.o
Christoph Hellwig284e9b02009-05-18 08:16:14 -040029
Vineeth Pillai11836462021-06-03 15:14:40 +000030ifdef CONFIG_HYPERV
31kvm-amd-y += svm/svm_onhyperv.o
32endif
33
Christoph Hellwig284e9b02009-05-18 08:16:14 -040034obj-$(CONFIG_KVM) += kvm.o
35obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
36obj-$(CONFIG_KVM_AMD) += kvm-amd.o