VirtualBox

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

Last change on this file since 107464 was 107171, checked in by vboxsync, 7 weeks ago

VMM/PGM: Introducing VBOX_WITH_ONLY_PGM_NEM_MODE to disable lots unused code on *.arm64 and darwin. jiraref:VBP-1466

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.8 KB
Line 
1# $Id: Config.kmk 107171 2024-11-28 10:38:10Z 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 VBOX_WITH_ONLY_PGM_NEM_MODE
48 endif
49else
50 VMM_COMMON_DEFS += VBOX_WITH_ONLY_PGM_NEM_MODE
51endif
52ifdef VBOX_WITH_HWVIRT
53 VMM_COMMON_DEFS += VBOX_WITH_HWVIRT
54endif
55ifdef VBOX_WITH_NESTED_HWVIRT_SVM
56 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_SVM
57endif
58
59# IEM config:
60ifndef IEM_WITHOUT_3DNOW
61 VMM_COMMON_DEFS += IEM_WITH_3DNOW
62else
63 VMM_COMMON_DEFS += IEM_WITHOUT_3DNOW
64endif
65ifndef IEM_WITHOUT_THREE_0F_38
66 VMM_COMMON_DEFS += IEM_WITH_THREE_0F_38
67else
68 VMM_COMMON_DEFS += IEM_WITHOUT_THREE_0F_38
69endif
70ifndef IEM_WITHOUT_THREE_0F_3A
71 VMM_COMMON_DEFS += IEM_WITH_THREE_0F_3A
72else
73 VMM_COMMON_DEFS += IEM_WITHOUT_THREE_0F_3A
74endif
75ifndef IEM_WITHOUT_VEX
76 VMM_COMMON_DEFS += IEM_WITH_VEX
77else
78 VMM_COMMON_DEFS += IEM_WITHOUT_VEX
79endif
80ifdef VBOX_WITH_IEM_RECOMPILER # Selectely removing hwvirt doesn't work yet with the recompiler. Python code doesn't check #ifdefs.
81 VMM_COMMON_DEFS += VBOX_WITH_IEM_RECOMPILER IEM_WITH_CODE_TLB IEM_WITH_DATA_TLB
82 ifdef VBOX_WITH_IEM_NATIVE_RECOMPILER
83 VMM_COMMON_DEFS += VBOX_WITH_IEM_NATIVE_RECOMPILER
84 endif
85 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_VMX
86 #ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT # Busted with TLB enabled.
87 # VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_VMX_EPT
88 #endif
89 ifdef VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM
90 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM
91 endif
92else ifdef VBOX_WITH_IEM_TLB ## @todo VMX code doesn't compile with TLBs enabled.
93 VMM_COMMON_DEFS += IEM_WITH_CODE_TLB IEM_WITH_DATA_TLB
94else
95 ifdef VBOX_WITH_NESTED_HWVIRT_VMX
96 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_VMX
97 endif
98 ifdef VBOX_WITH_NESTED_HWVIRT_VMX_EPT
99 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_VMX_EPT
100 endif
101 ifdef VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM
102 VMM_COMMON_DEFS += VBOX_WITH_NESTED_HWVIRT_ONLY_IN_IEM
103 endif
104endif
105ifdef IEM_WITHOUT_ASSEMBLY
106 VMM_COMMON_DEFS += IEM_WITHOUT_ASSEMBLY
107endif
108
109# part of global DEFS
110ifdef VBOX_WITH_MULTI_CORE
111 VMM_COMMON_DEFS += VBOX_WITH_MULTI_CORE
112endif
113ifdef VBOX_WITH_R0_LOGGING
114 VMM_COMMON_DEFS += VBOX_WITH_R0_LOGGING
115endif
116ifdef VBOX_WITH_PCI_PASSTHROUGH
117 VMM_COMMON_DEFS += VBOX_WITH_PCI_PASSTHROUGH
118endif
119ifdef VBOX_WITH_DTRACE_RC
120 VMM_COMMON_DEFS += VBOX_WITH_DTRACE_RC
121endif
122ifdef VBOX_WITH_SAFE_STR
123 VMM_COMMON_DEFS += VBOX_WITH_SAFE_STR
124endif
125ifdef VBOX_WITH_64ON32_CMOS_DEBUG
126 VMM_COMMON_DEFS += VBOX_WITH_64ON32_CMOS_DEBUG
127endif
128ifdef VBOXSTRICTRC_STRICT_ENABLED
129 VMM_COMMON_DEFS += VBOXSTRICTRC_STRICT_ENABLED
130endif
131if defined(VBOX_WITH_NATIVE_NEM) || !defined(VBOX_WITHOUT_PGM_NEM_MODE)
132 VMM_COMMON_DEFS += VBOX_WITH_PGM_NEM_MODE
133endif
134ifdef VBOX_WITH_NATIVE_NEM
135 if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.amd64 linux.amd64 win.amd64)
136 VMM_COMMON_DEFS += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0
137 endif
138endif
139if1of ($(KBUILD_TARGET), freebsd linux solaris) # Hosts that implements SUPR0HCPhysToVirt.
140 VMM_COMMON_DEFS += VBOX_WITH_LINEAR_HOST_PHYS_MEM
141endif
142
143
144# VMM_COMMON_DEFS += VBOX_WITH_NS_ACCOUNTING_STATS
145
146
147#
148# Generate macro template for IEM instruction statistics.
149#
150# @param 1 The target name.
151# @param 2 The dir to put the header in.
152#
153define def_VBoxGenIEMInstructionStatisticsTmpl_Header
154 $(1)_INTERMEDIATES += $(2)/IEMInstructionStatisticsTmpl.h
155 $(1)_CLEAN += \
156 $(2)/IEMInstructionStatisticsTmpl.h.ts \
157 $(2)/IEMInstructionStatisticsTmpl.h
158 $$(call KB_FN_AUTO_CMD_DEPS,$(2)/IEMInstructionStatisticsTmpl.h.ts)
159 $(2)/IEMInstructionStatisticsTmpl.h.ts \
160 +| $(2)/IEMInstructionStatisticsTmpl.h: \
161 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstCommon.cpp.h \
162 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstOneByte.cpp.h \
163 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstTwoByte0f.cpp.h \
164 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstThree0f38.cpp.h \
165 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstThree0f3a.cpp.h \
166 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstVexMap1.cpp.h \
167 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstVexMap2.cpp.h \
168 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInstVexMap3.cpp.h \
169 $$(VBOX_PATH_SRC_VMM)/VMMAll/IEMAllInst3DNow.cpp.h
170 $$(QUIET)$(call MSG_GENERATE,$(1),$$@,VMMAll/IEMAllInst*.cpp.h)
171 $$(QUIET)$$(RM) -f -- "[email protected]" "[email protected]" "[email protected]"
172 $$(QUIET)$$(MKDIR) -p -- "$$(dir $$@)"
173 $$(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
174 $$(QUIET)$$(SED) \
175 -e '/IEMOP_MNEMONIC\(\|[01234]\|[01234]EX\)(/!d' \
176 -e '/^ *# *define *IEMOP_MNEMONIC/d' \
177 -e ':look-for-end-of-invocation' \
178 -e '/)/bend-of-invocation' \
179 -e 'N' \
180 -e 'blook-for-end-of-invocation' \
181 -e ':end-of-invocation' \
182 -e 's/\n/ /g' \
183 -e 's/ */ /g' \
184 -e 's/^.*IEMOP_MNEMONIC\(\|[01234]\|[01234]EX\)(/IEM_DO_INSTR_STAT\1(/' \
185 -e 's/;.*$$(DOLLAR)//' \
186 --output "[email protected]" $$(filter %.cpp.h,$$^)
187 # Windows sort does some kind of seeking. So, we must use a temporary file and kmk_cat to define and undefine our macros.
188 $$(QUIET)$$(REDIRECT) -wto "[email protected]" -- sort "[email protected]"
189 $$(QUIET)$$(APPEND) -nt "$$@" \
190 '/* Warning autogenerated by VMM/Makefile.kmk. */ ' \
191 '#define IEM_DO_INSTR_STAT0(f,u,l,fd,fi) IEM_DO_INSTR_STAT(l, #l)' \
192 '#define IEM_DO_INSTR_STAT1(f,u,l,o1,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1, #l " " #o1)' \
193 '#define IEM_DO_INSTR_STAT2(f,u,l,o1,o2,fd,fi) IEM_DO_INSTR_STAT(l ## _ ## o1 ## _ ## o2, #l " " #o1 "," #o2)' \
194 '#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)' \
195 '#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)' \
196 '#define IEM_DO_INSTR_STAT0EX(s,m,f,u,l,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
197 '#define IEM_DO_INSTR_STAT1EX(s,m,f,u,l,o1,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
198 '#define IEM_DO_INSTR_STAT2EX(s,m,f,u,l,o1,o2,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
199 '#define IEM_DO_INSTR_STAT3EX(s,m,f,u,l,o1,o2,o3,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
200 '#define IEM_DO_INSTR_STAT4EX(s,m,f,u,l,o1,o2,o3,o4,fd,fi) IEM_DO_INSTR_STAT(s,m)' \
201 ''
202 $$(QUIET)$$(REDIRECT) -ato "$$@" -- $$(CAT_EXT) "[email protected]"
203 $$(QUIET)$$(APPEND) -n "$$@" \
204 '' \
205 '#undef IEM_DO_INSTR_STAT0' \
206 '#undef IEM_DO_INSTR_STAT1' \
207 '#undef IEM_DO_INSTR_STAT2' \
208 '#undef IEM_DO_INSTR_STAT3' \
209 '#undef IEM_DO_INSTR_STAT4' \
210 '#undef IEM_DO_INSTR_STAT0EX' \
211 '#undef IEM_DO_INSTR_STAT1EX' \
212 '#undef IEM_DO_INSTR_STAT2EX' \
213 '#undef IEM_DO_INSTR_STAT3EX' \
214 '#undef IEM_DO_INSTR_STAT4EX' \
215 ''
216 $$(QUIET)$$(RM) -f -- "[email protected]" "[email protected]"
217 $$(QUIET)$$(CP) -v -f --changed -- "$$@" "$$(patsubst %.ts,%,$$@)"
218
219endef
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