Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Avi Kivity | edf8841 | 2007-12-16 11:02:48 +0200 | [diff] [blame] | 2 | |
Siddharth Chandrasekaran | 6fb3084 | 2021-03-24 13:43:47 +0100 | [diff] [blame] | 3 | ccflags-y += -I $(srctree)/arch/x86/kvm |
Paolo Bonzini | 4f337fa | 2020-02-28 10:42:31 +0100 | [diff] [blame] | 4 | ccflags-$(CONFIG_KVM_WERROR) += -Werror |
Avi Kivity | edf8841 | 2007-12-16 11:02:48 +0200 | [diff] [blame] | 5 | |
Josh Poimboeuf | 7f4b5cd | 2020-04-20 11:17:37 -0500 | [diff] [blame] | 6 | ifeq ($(CONFIG_FRAME_POINTER),y) |
| 7 | OBJECT_FILES_NON_STANDARD_vmenter.o := y |
| 8 | endif |
| 9 | |
Marc Zyngier | 535cf7b | 2013-05-14 14:31:02 +0100 | [diff] [blame] | 10 | KVM := ../../../virt/kvm |
| 11 | |
Paolo Bonzini | 6ef768f | 2014-11-20 13:45:31 +0100 | [diff] [blame] | 12 | kvm-y += $(KVM)/kvm_main.o $(KVM)/coalesced_mmio.o \ |
Peter Xu | fb04a1e | 2020-09-30 21:22:22 -0400 | [diff] [blame] | 13 | $(KVM)/eventfd.o $(KVM)/irqchip.o $(KVM)/vfio.o \ |
Jing Zhang | cb082bf | 2021-06-18 22:27:04 +0000 | [diff] [blame] | 14 | $(KVM)/dirty_ring.o $(KVM)/binary_stats.o |
Marc Zyngier | 535cf7b | 2013-05-14 14:31:02 +0100 | [diff] [blame] | 15 | kvm-$(CONFIG_KVM_ASYNC_PF) += $(KVM)/async_pf.o |
Christoph Hellwig | 284e9b0 | 2009-05-18 08:16:14 -0400 | [diff] [blame] | 16 | |
Paolo Bonzini | b59b153 | 2021-02-26 04:54:45 -0500 | [diff] [blame] | 17 | kvm-y += x86.o emulate.o i8259.o irq.o lapic.o \ |
Andrey Smetanin | e83d588 | 2015-07-03 15:01:34 +0300 | [diff] [blame] | 18 | i8254.o ioapic.o irq_comm.o cpuid.o pmu.o mtrr.o \ |
Paolo Bonzini | 5a9624a | 2020-10-16 10:29:37 -0400 | [diff] [blame] | 19 | hyperv.o debugfs.o mmu/mmu.o mmu/page_track.o \ |
Paolo Bonzini | 897218f | 2021-02-06 09:53:33 -0500 | [diff] [blame] | 20 | mmu/spte.o |
Vineeth Pillai | 3c86c0d | 2021-06-03 15:14:36 +0000 | [diff] [blame] | 21 | |
| 22 | ifdef CONFIG_HYPERV |
| 23 | kvm-y += kvm_onhyperv.o |
| 24 | endif |
| 25 | |
Paolo Bonzini | 897218f | 2021-02-06 09:53:33 -0500 | [diff] [blame] | 26 | kvm-$(CONFIG_X86_64) += mmu/tdp_iter.o mmu/tdp_mmu.o |
Paolo Bonzini | b59b153 | 2021-02-26 04:54:45 -0500 | [diff] [blame] | 27 | kvm-$(CONFIG_KVM_XEN) += xen.o |
Andrey Smetanin | e83d588 | 2015-07-03 15:01:34 +0300 | [diff] [blame] | 28 | |
Xiaoyao Li | 8888cdd | 2020-09-23 11:31:11 -0700 | [diff] [blame] | 29 | kvm-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 Christopherson | 9798adb | 2021-04-12 16:21:38 +1200 | [diff] [blame] | 31 | kvm-intel-$(CONFIG_X86_SGX_KVM) += vmx/sgx.o |
| 32 | |
Uros Bizjak | 199cd1d | 2020-03-30 15:02:13 +0200 | [diff] [blame] | 33 | kvm-amd-y += svm/svm.o svm/vmenter.o svm/pmu.o svm/nested.o svm/avic.o svm/sev.o |
Christoph Hellwig | 284e9b0 | 2009-05-18 08:16:14 -0400 | [diff] [blame] | 34 | |
Vineeth Pillai | 1183646 | 2021-06-03 15:14:40 +0000 | [diff] [blame] | 35 | ifdef CONFIG_HYPERV |
| 36 | kvm-amd-y += svm/svm_onhyperv.o |
| 37 | endif |
| 38 | |
Christoph Hellwig | 284e9b0 | 2009-05-18 08:16:14 -0400 | [diff] [blame] | 39 | obj-$(CONFIG_KVM) += kvm.o |
| 40 | obj-$(CONFIG_KVM_INTEL) += kvm-intel.o |
| 41 | obj-$(CONFIG_KVM_AMD) += kvm-amd.o |