blob: 75dfd27b6e8a567b0f39d184e4cbc0be527b43fc [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
Marc Zyngier535cf7b2013-05-14 14:31:02 +010010KVM := ../../../virt/kvm
11
Paolo Bonzini6ef768f2014-11-20 13:45:31 +010012kvm-y += $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \
Peter Xufb04a1e2020-09-30 21:22:22 -040013 $(KVM)/eventfd.o $(KVM)/irqchip.o $(KVM)/vfio.o \
Jing Zhangcb082bf2021-06-18 22:27:04 +000014 $(KVM)/dirty_ring.o $(KVM)/binary_stats.o
Marc Zyngier535cf7b2013-05-14 14:31:02 +010015kvm-$(CONFIG_KVM_ASYNC_PF) += $(KVM)/async_pf.o
Christoph Hellwig284e9b02009-05-18 08:16:14 -040016
Paolo Bonzinib59b1532021-02-26 04:54:45 -050017kvm-y += x86.o emulate.o i8259.o irq.o lapic.o \
Andrey Smetanine83d5882015-07-03 15:01:34 +030018 i8254.o ioapic.o irq_comm.o cpuid.o pmu.o mtrr.o \
Paolo Bonzini5a9624a2020-10-16 10:29:37 -040019 hyperv.o debugfs.o mmu/mmu.o mmu/page_track.o \
Paolo Bonzini897218f2021-02-06 09:53:33 -050020 mmu/spte.o
Vineeth Pillai3c86c0d2021-06-03 15:14:36 +000021
22ifdef CONFIG_HYPERV
23kvm-y += kvm_onhyperv.o
24endif
25
Paolo Bonzini897218f2021-02-06 09:53:33 -050026kvm-$(CONFIG_X86_64) += mmu/tdp_iter.o mmu/tdp_mmu.o
Paolo Bonzinib59b1532021-02-26 04:54:45 -050027kvm-$(CONFIG_KVM_XEN) += xen.o
Andrey Smetanine83d5882015-07-03 15:01:34 +030028
Xiaoyao Li8888cdd2020-09-23 11:31:11 -070029kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \
30 vmx/evmcs.o vmx/nested.o vmx/posted_intr.o
Sean Christopherson9798adb2021-04-12 16:21:38 +120031kvm-intel-$(CONFIG_X86_SGX_KVM) += vmx/sgx.o
32
Uros Bizjak199cd1d2020-03-30 15:02:13 +020033kvm-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 -040034
Vineeth Pillai11836462021-06-03 15:14:40 +000035ifdef CONFIG_HYPERV
36kvm-amd-y += svm/svm_onhyperv.o
37endif
38
Christoph Hellwig284e9b02009-05-18 08:16:14 -040039obj-$(CONFIG_KVM) += kvm.o
40obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
41obj-$(CONFIG_KVM_AMD) += kvm-amd.o