1# 2# This file and its contents are supplied under the terms of the 3# Common Development and Distribution License ("CDDL"), version 1.0. 4# You may only use this file in accordance with the terms of version 5# 1.0 of the CDDL. 6# 7# A full copy of the text of the CDDL should have accompanied this 8# source. A copy of the CDDL is also available via the Internet at 9# http://www.illumos.org/license/CDDL. 10# 11 12# 13# Copyright 2019 Joyent, Inc. 14# Copyright 2022 Oxide Computer Company 15# 16 17CONF_SRCDIR = $(UTSBASE)/intel/io/vmm 18MAPFILE = $(UTSBASE)/intel/io/vmm/vmm.mapfile 19 20PRE_INC_PATH = \ 21 -I$(COMPAT)/bhyve \ 22 -I$(COMPAT)/bhyve/amd64 \ 23 -I$(CONTRIB)/bhyve \ 24 -I$(CONTRIB)/bhyve/amd64 25 26INC_PATH += -I$(UTSBASE)/intel/io/vmm -I$(UTSBASE)/intel/io/vmm/io 27AS_INC_PATH += -I$(UTSBASE)/intel/io/vmm -I$(OBJS_DIR) 28 29# enable collection of VMM statistics 30CFLAGS += -DVMM_KEEP_STATS 31 32LDFLAGS += -N misc/pcie -N fs/dev 33LDFLAGS += -M $(MAPFILE) 34 35# devmem span calculations currently run afoul of overflow checks 36$(OBJS_DIR)/vmm_sol_dev.o := SMOFF += signed_integer_overflow_check 37# vmm_zsd_add_vm() failure unhandled in face of racing zone shutdown 38$(OBJS_DIR)/vmm_sol_dev.o := SMOFF += all_func_returns 39 40OFFSETS_VMX = $(CONF_SRCDIR)/intel/offsets.in 41OFFSETS_SVM = $(CONF_SRCDIR)/amd/offsets.in 42ASSYM_VMX = $(OBJS_DIR)/vmx_assym.h 43ASSYM_SVM = $(OBJS_DIR)/svm_assym.h 44 45CLEANFILES += $(ASSYM_VMX) $(ASSYM_SVM) 46 47VMM_OBJS = \ 48 vmm.o \ 49 vmm_sol_dev.o \ 50 vmm_host.o \ 51 vmm_instruction_emul.o \ 52 vmm_ioport.o \ 53 vmm_lapic.o \ 54 vmm_stat.o \ 55 vmm_util.o \ 56 vmm_cpuid.o \ 57 x86.o \ 58 iommu.o \ 59 vatpic.o \ 60 vatpit.o \ 61 vhpet.o \ 62 vioapic.o \ 63 vlapic.o \ 64 vrtc.o \ 65 vpmtmr.o \ 66 vmcs.o \ 67 vmx_msr.o \ 68 vmx.o \ 69 vmx_support.o \ 70 svm.o \ 71 svm_msr.o \ 72 vmcb.o \ 73 svm_support.o \ 74 vmm_gpt.o \ 75 seg_vmm.o \ 76 vmm_reservoir.o \ 77 vmm_sol_glue.o \ 78 vmm_sol_ept.o \ 79 vmm_sol_rvi.o \ 80 vmm_support.o \ 81 vmm_vm.o \ 82 vmm_zsd.o 83