xref: /illumos-gate/usr/src/uts/intel/io/vmm/Makefile.vmm (revision e760f150)
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	x86.o \
57	iommu.o \
58	vatpic.o \
59	vatpit.o \
60	vhpet.o \
61	vioapic.o \
62	vlapic.o \
63	vrtc.o \
64	vpmtmr.o \
65	vmcs.o \
66	vmx_msr.o \
67	vmx.o \
68	vmx_support.o \
69	svm.o \
70	svm_msr.o \
71	vmcb.o \
72	svm_support.o \
73	vmm_gpt.o \
74	seg_vmm.o \
75	vmm_reservoir.o \
76	vmm_sol_glue.o \
77	vmm_sol_ept.o \
78	vmm_sol_rvi.o \
79	vmm_support.o \
80	vmm_vm.o \
81	vmm_zsd.o
82