27ca867042
Stop compiling vmenter.S with OBJECT_FILES_NON_STANDARD to skip objtool's stack validation now that __svm_vcpu_run() and __svm_sev_es_vcpu_run() create stack frames (though the former's effectiveness is dubious). Note, due to a quirk in how OBJECT_FILES_NON_STANDARD was handled by the build system prior to commitbf48d9b756
("kbuild: change tool coverage variables to take the path relative to $(obj)"), vmx/vmenter.S got lumped in with svm/vmenter.S. __vmx_vcpu_run() already plays nice with frame pointers, i.e. it was collateral damage when commit7f4b5cde24
("kvm: Disable objtool frame pointer checking for vmenter.S") added the OBJECT_FILES_NON_STANDARD hack-a-fix. Link: https://lore.kernel.org/all/20240217055504.2059803-1-masahiroy@kernel.org Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Link: https://lore.kernel.org/r/20240223204233.3337324-9-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
49 lines
1.4 KiB
Makefile
49 lines
1.4 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
ccflags-y += -I $(srctree)/arch/x86/kvm
|
|
ccflags-$(CONFIG_KVM_WERROR) += -Werror
|
|
|
|
include $(srctree)/virt/kvm/Makefile.kvm
|
|
|
|
kvm-y += x86.o emulate.o i8259.o irq.o lapic.o \
|
|
i8254.o ioapic.o irq_comm.o cpuid.o pmu.o mtrr.o \
|
|
debugfs.o mmu/mmu.o mmu/page_track.o \
|
|
mmu/spte.o
|
|
|
|
kvm-$(CONFIG_X86_64) += mmu/tdp_iter.o mmu/tdp_mmu.o
|
|
kvm-$(CONFIG_KVM_HYPERV) += hyperv.o
|
|
kvm-$(CONFIG_KVM_XEN) += xen.o
|
|
kvm-$(CONFIG_KVM_SMM) += smm.o
|
|
|
|
kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \
|
|
vmx/nested.o vmx/posted_intr.o
|
|
|
|
kvm-intel-$(CONFIG_X86_SGX_KVM) += vmx/sgx.o
|
|
kvm-intel-$(CONFIG_KVM_HYPERV) += vmx/hyperv.o vmx/hyperv_evmcs.o
|
|
|
|
kvm-amd-y += svm/svm.o svm/vmenter.o svm/pmu.o svm/nested.o svm/avic.o \
|
|
svm/sev.o
|
|
kvm-amd-$(CONFIG_KVM_HYPERV) += svm/hyperv.o
|
|
|
|
ifdef CONFIG_HYPERV
|
|
kvm-y += kvm_onhyperv.o
|
|
kvm-intel-y += vmx/vmx_onhyperv.o vmx/hyperv_evmcs.o
|
|
kvm-amd-y += svm/svm_onhyperv.o
|
|
endif
|
|
|
|
obj-$(CONFIG_KVM) += kvm.o
|
|
obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
|
|
obj-$(CONFIG_KVM_AMD) += kvm-amd.o
|
|
|
|
AFLAGS_svm/vmenter.o := -iquote $(obj)
|
|
$(obj)/svm/vmenter.o: $(obj)/kvm-asm-offsets.h
|
|
|
|
AFLAGS_vmx/vmenter.o := -iquote $(obj)
|
|
$(obj)/vmx/vmenter.o: $(obj)/kvm-asm-offsets.h
|
|
|
|
$(obj)/kvm-asm-offsets.h: $(obj)/kvm-asm-offsets.s FORCE
|
|
$(call filechk,offsets,__KVM_ASM_OFFSETS_H__)
|
|
|
|
targets += kvm-asm-offsets.s
|
|
clean-files += kvm-asm-offsets.h
|