VirtualBox

source: vbox/trunk/src/VBox/VMM/Config.kmk@ 107044

Last change on this file since 107044 was 106920, checked in by vboxsync, 2 weeks ago

/Config.kmk,Devices/Makefile.kmk,VMM/*: Introducing VBOX_WITH_MINIMAL_R0 for win.arm64 and similar build configurations not really needing much from VMMR0.r0/VBoxSup.sys. jiraref:VBP-1449

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.7 KB
Line 
1# $Id: Config.kmk 106920 2024-11-11 01:09:38Z vboxsync $
2## @file
3# kBuild Configuration file for the VMM.
4#
5
6#
7# Copyright (C) 2006-2024 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28VBOX_VMM_CONFIG_KMK_INCLUDED = 1
29
30# Include the top-level configure file.
31ifndef VBOX_ROOT_CONFIG_KMK_INCLUDED
32 include $(PATH_ROOT)/Config.kmk
33endif
34
35#
36# Globals
37#
38
39VBOX_PATH_SRC_VMM := $(PATH_ROOT)/src/VBox/VMM
40
41## DEFS variable that is picked up by all three VMM targets (R0, R3, RC).
42# Can be prepended to by setting it in LocalConfig.kmk
43VMM_COMMON_DEFS := USING_VMM_COMMON_DEFS
44ifdef VBOX_WITH_R0_MODULES
45 VMM_COMMON_DEFS += VBOX_WITH_R0_MODULES
46 ifdef VBOX_WITH_MINIMAL_R0
47 VMM_COMMON_DEFS += VBOX_WITH_MINIMAL_R0
48 endif
49endif
50ifdef VBOX_WITH_HWVIRT
51 VMM_COMMON_DEFS += VBOX_WITH_HWVIRT
52endif
53ifdef VBOX_WITH_NESTED_HWVIRT_SVM
54 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_SVM
55endif
56
57# IEM config:
58ifndef IEM_WITHOUT_3DNOW
59 VMM_COMMON_DEFS += IEM_WITH_3DNOW
60else
61 VMM_COMMON_DEFS += IEM_WITHOUT_3DNOW
62endif
63ifndef IEM_WITHOUT_THREE_0F_38
64 VMM_COMMON_DEFS += IEM_WITH_THREE_0F_38
65else
66 VMM_COMMON_DEFS += IEM_WITHOUT_THREE_0F_38
67endif
68ifndef IEM_WITHOUT_THREE_0F_3A
69 VMM_COMMON_DEFS += IEM_WITH_THREE_0F_3A
70else
71 VMM_COMMON_DEFS += IEM_WITHOUT_THREE_0F_3A
72endif
73ifndef IEM_WITHOUT_VEX
74 VMM_COMMON_DEFS += IEM_WITH_VEX
75else
76 VMM_COMMON_DEFS += IEM_WITHOUT_VEX
77endif
78ifdef VBOX_WITH_IEM_RECOMPILER # Selectely removing hwvirt doesn't work yet with the recompiler. Python code doesn't check #ifdefs.
79 VMM_COMMON_DEFS += VBOX_WITH_IEM_RECOMPILER IEM_WITH_CODE_TLB IEM_WITH_DATA_TLB
80 ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER
81 VMM_COMMON_DEFS += VBOX_WITH_IEM_NATIVE_RECOMPILER
82 endif
83 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_VMX
84 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT # Busted with TLB enabled.
85 # VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_VMX_EPT
86 #endif
87 ifdef VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM
88 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM
89 endif
90else ifdef VBOX_WITH_IEM_TLB ## @todo VMX code doesn't compile with TLBs enabled.
91 VMM_COMMON_DEFS += IEM_WITH_CODE_TLB IEM_WITH_DATA_TLB
92else
93 ifdef VBOX_WITH_NESTED_HWVIRT_VMX
94 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_VMX
95 endif
96 ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT
97 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_VMX_EPT
98 endif
99 ifdef VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM
100 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM
101 endif
102endif
103ifdef IEM_WITHOUT_ASSEMBLY
104 VMM_COMMON_DEFS += IEM_WITHOUT_ASSEMBLY
105endif
106
107# part of global DEFS
108ifdef VBOX_WITH_MULTI_CORE
109 VMM_COMMON_DEFS += VBOX_WITH_MULTI_CORE
110endif
111ifdef VBOX_WITH_R0_LOGGING
112 VMM_COMMON_DEFS += VBOX_WITH_R0_LOGGING
113endif
114ifdef VBOX_WITH_PCI_PASSTHROUGH
115 VMM_COMMON_DEFS += VBOX_WITH_PCI_PASSTHROUGH
116endif
117ifdef VBOX_WITH_DTRACE_RC
118 VMM_COMMON_DEFS += VBOX_WITH_DTRACE_RC
119endif
120ifdef VBOX_WITH_SAFE_STR
121 VMM_COMMON_DEFS += VBOX_WITH_SAFE_STR
122endif
123ifdef VBOX_WITH_64ON32_CMOS_DEBUG
124 VMM_COMMON_DEFS += VBOX_WITH_64ON32_CMOS_DEBUG
125endif
126ifdef VBOXSTRICTRC_STRICT_ENABLED
127 VMM_COMMON_DEFS += VBOXSTRICTRC_STRICT_ENABLED
128endif
129if defined(VBOX_WITH_NATIVE_NEM) || !defined(VBOX_WITHOUT_PGM_NEM_MODE)
130 VMM_COMMON_DEFS += VBOX_WITH_PGM_NEM_MODE
131endif
132ifdef VBOX_WITH_NATIVE_NEM
133 if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.amd64 linux.amd64 win.amd64)
134 VMM_COMMON_DEFS += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0
135 endif
136endif
137if1of ($(KBUILD_TARGET), freebsd linux solaris) # Hosts that implements SUPR0HCPhysToVirt.
138 VMM_COMMON_DEFS += VBOX_WITH_LINEAR_HOST_PHYS_MEM
139endif
140
141
142# VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS
143
144
145#
146# Generate macro template for IEM instruction statistics.
147#
148# @param 1 The target name.
149# @param 2 The dir to put the header in.
150#
151define def_VBoxGenIEMInstructionStatisticsTmpl_Header
152 $(1)_INTERMEDIATES += $(2)/IEMInstructionStatisticsTmpl.h
153 $(1)_CLEAN += \
154 $(2)/IEMInstructionStatisticsTmpl.h.ts \
155 $(2)/IEMInstructionStatisticsTmpl.h
156 $$(call KB_FN_AUTO_CMD_DEPS,$(2)/IEMInstructionStatisticsTmpl.h.ts)
157 $(2)/IEMInstructionStatisticsTmpl.h.ts \
158 +| $(2)/IEMInstructionStatisticsTmpl.h: \
159 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstCommon.cpp.h \
160 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstOneByte.cpp.h \
161 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstTwoByte0f.cpp.h \
162 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstThree0f38.cpp.h \
163 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstThree0f3a.cpp.h \
164 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstVexMap1.cpp.h \
165 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstVexMap2.cpp.h \
166 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstVexMap3.cpp.h \
167 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInst3DNow.cpp.h
168 $$(QUIET)$(call MSG_GENERATE,$(1),$$@,VMMAll/IEMAllInst*.cpp.h)
169 $$(QUIET)$$(RM) -f -- "$$@.tmp" "$$@.tmp" "$$@.sorted"
170 $$(QUIET)$$(MKDIR) -p -- "$$(dir $$@)"
171 $$(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
172 $$(QUIET)$$(SED) \
173 -e '/IEMOP_MNEMONIC\(\|[01234]\|[01234]EX\)(/!d' \
174 -e '/^ *# *define *IEMOP_MNEMONIC/d' \
175 -e ':look-for-end-of-invocation' \
176 -e '/)/bend-of-invocation' \
177 -e 'N' \
178 -e 'blook-for-end-of-invocation' \
179 -e ':end-of-invocation' \
180 -e 's/\n/ /g' \
181 -e 's/ */ /g' \
182 -e 's/^.*IEMOP_MNEMONIC\(\|[01234]\|[01234]EX\)(/IEM_DO_INSTR_STAT\1(/' \
183 -e 's/;.*$$(DOLLAR)//' \
184 --output "$$@.tmp" $$(filter %.cpp.h,$$^)
185 # Windows sort does some kind of seeking. So, we must use a temporary file and kmk_cat to define and undefine our macros.
186 $$(QUIET)$$(REDIRECT) -wto "$$@.sorted" -- sort "$$@.tmp"
187 $$(QUIET)$$(APPEND) -nt "$$@" \
188 '/* Warning autogenerated by VMM/Makefile.kmk. */ ' \
189 '#define IEM_DO_INSTR_STAT0(f,u,l,fd,fi) IEM_DO_INSTR_STAT(l, #l)' \
190 '#define IEM_DO_INSTR_STAT1(f,u,l,o1,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1, #l " " #o1)' \
191 '#define IEM_DO_INSTR_STAT2(f,u,l,o1,o2,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1 ## _ ## o2, #l " " #o1 "," #o2)' \
192 '#define IEM_DO_INSTR_STAT3(f,u,l,o1,o2,o3,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1 ## _ ## o2 ## _ ## o3, #l " " #o1 "," #o2 "," #o3)' \
193 '#define IEM_DO_INSTR_STAT4(f,u,l,o1,o2,o3,o4,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1 ## _ ## o2 ## _ ## o3 ## _ ## o4, #l " " #o1 "," #o2 "," #o3 "," #o4)' \
194 '#define IEM_DO_INSTR_STAT0EX(s,m,f,u,l,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
195 '#define IEM_DO_INSTR_STAT1EX(s,m,f,u,l,o1,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
196 '#define IEM_DO_INSTR_STAT2EX(s,m,f,u,l,o1,o2,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
197 '#define IEM_DO_INSTR_STAT3EX(s,m,f,u,l,o1,o2,o3,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
198 '#define IEM_DO_INSTR_STAT4EX(s,m,f,u,l,o1,o2,o3,o4,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
199 ''
200 $$(QUIET)$$(REDIRECT) -ato "$$@" -- $$(CAT_EXT) "$$@.sorted"
201 $$(QUIET)$$(APPEND) -n "$$@" \
202 '' \
203 '#undef IEM_DO_INSTR_STAT0' \
204 '#undef IEM_DO_INSTR_STAT1' \
205 '#undef IEM_DO_INSTR_STAT2' \
206 '#undef IEM_DO_INSTR_STAT3' \
207 '#undef IEM_DO_INSTR_STAT4' \
208 '#undef IEM_DO_INSTR_STAT0EX' \
209 '#undef IEM_DO_INSTR_STAT1EX' \
210 '#undef IEM_DO_INSTR_STAT2EX' \
211 '#undef IEM_DO_INSTR_STAT3EX' \
212 '#undef IEM_DO_INSTR_STAT4EX' \
213 ''
214 $$(QUIET)$$(RM) -f -- "$$@.tmp" "$$@.sorted"
215 $$(QUIET)$$(CP) -v -f --changed -- "$$@" "$$(patsubst %.ts,%,$$@)"
216
217endef
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette