1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2edf88417SAvi Kivity 36fb3084aSSiddharth Chandrasekaranccflags-y += -I $(srctree)/arch/x86/kvm 44f337fafSPaolo Bonziniccflags-$(CONFIG_KVM_WERROR) += -Werror 5edf88417SAvi Kivity 66f2cdbdbSDavid Woodhouseinclude $(srctree)/virt/kvm/Makefile.kvm 7284e9b0fSChristoph Hellwig 8b59b153dSPaolo Bonzinikvm-y += x86.o emulate.o i8259.o irq.o lapic.o \ 9e83d5887SAndrey Smetanin i8254.o ioapic.o irq_comm.o cpuid.o pmu.o mtrr.o \ 10b4f69df0SVitaly Kuznetsov debugfs.o mmu/mmu.o mmu/page_track.o \ 11897218ffSPaolo Bonzini mmu/spte.o 123c86c0d3SVineeth Pillai 13897218ffSPaolo Bonzinikvm-$(CONFIG_X86_64) += mmu/tdp_iter.o mmu/tdp_mmu.o 14b4f69df0SVitaly Kuznetsovkvm-$(CONFIG_KVM_HYPERV) += hyperv.o 15b59b153dSPaolo Bonzinikvm-$(CONFIG_KVM_XEN) += xen.o 164b8e1b32SPaolo Bonzinikvm-$(CONFIG_KVM_SMM) += smm.o 17e83d5887SAndrey Smetanin 188888cdd0SXiaoyao Likvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \ 195f18c642SPaolo Bonzini vmx/nested.o vmx/posted_intr.o vmx/main.o 209798adbcSSean Christopherson 21b4f69df0SVitaly Kuznetsovkvm-intel-$(CONFIG_X86_SGX_KVM) += vmx/sgx.o 22b4f69df0SVitaly Kuznetsovkvm-intel-$(CONFIG_KVM_HYPERV) += vmx/hyperv.o vmx/hyperv_evmcs.o 2350a82b0eSVitaly Kuznetsov 240d7bf5e5SPaolo Bonzinikvm-amd-y += svm/svm.o svm/vmenter.o svm/pmu.o svm/nested.o svm/avic.o 250d7bf5e5SPaolo Bonzini 260d7bf5e5SPaolo Bonzinikvm-amd-$(CONFIG_KVM_AMD_SEV) += svm/sev.o 27b4f69df0SVitaly Kuznetsovkvm-amd-$(CONFIG_KVM_HYPERV) += svm/hyperv.o 28284e9b0fSChristoph Hellwig 291183646aSVineeth Pillaiifdef CONFIG_HYPERV 30b4f69df0SVitaly Kuznetsovkvm-y += kvm_onhyperv.o 31b4f69df0SVitaly Kuznetsovkvm-intel-y += vmx/vmx_onhyperv.o vmx/hyperv_evmcs.o 321183646aSVineeth Pillaikvm-amd-y += svm/svm_onhyperv.o 331183646aSVineeth Pillaiendif 341183646aSVineeth Pillai 35*ea4290d7SPaolo Bonziniobj-$(CONFIG_KVM_X86) += kvm.o 36edf88417SAvi Kivityobj-$(CONFIG_KVM_INTEL) += kvm-intel.o 37edf88417SAvi Kivityobj-$(CONFIG_KVM_AMD) += kvm-amd.o 38debc5a1eSPaolo Bonzini 3916fdc1deSPaolo BonziniAFLAGS_svm/vmenter.o := -iquote $(obj) 4016fdc1deSPaolo Bonzini$(obj)/svm/vmenter.o: $(obj)/kvm-asm-offsets.h 4116fdc1deSPaolo Bonzini 42debc5a1eSPaolo BonziniAFLAGS_vmx/vmenter.o := -iquote $(obj) 43debc5a1eSPaolo Bonzini$(obj)/vmx/vmenter.o: $(obj)/kvm-asm-offsets.h 44debc5a1eSPaolo Bonzini 45debc5a1eSPaolo Bonzini$(obj)/kvm-asm-offsets.h: $(obj)/kvm-asm-offsets.s FORCE 46debc5a1eSPaolo Bonzini $(call filechk,offsets,__KVM_ASM_OFFSETS_H__) 47debc5a1eSPaolo Bonzini 48debc5a1eSPaolo Bonzinitargets += kvm-asm-offsets.s 49debc5a1eSPaolo Bonziniclean-files += kvm-asm-offsets.h 50