VirtualBox

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

Last change on this file was 106061, checked in by vboxsync, 7 weeks ago

Copyright year updates by scm.

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