1 | # $Id: Makefile.kmk 96931 2022-09-29 09:55:49Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the VMM testcases.
|
---|
4 | #
|
---|
5 |
|
---|
6 | #
|
---|
7 | # Copyright (C) 2006-2022 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 |
|
---|
28 | SUB_DEPTH = ../../../..
|
---|
29 | include $(KBUILD_PATH)/subheader.kmk
|
---|
30 |
|
---|
31 | #
|
---|
32 | # Include sub-makefiles.
|
---|
33 | #
|
---|
34 | if 0 # Not ready for general consumption yet.
|
---|
35 | include $(PATH_SUB_CURRENT)/Instructions/Makefile.kmk
|
---|
36 | endif
|
---|
37 |
|
---|
38 | #
|
---|
39 | # Target lists.
|
---|
40 | #
|
---|
41 | PROGRAMS += tstVMStructSize tstAsmStructs
|
---|
42 | ifdef VBOX_WITH_RAW_MODE
|
---|
43 | PROGRAMS += tstVMStructRC tstAsmStructsRC
|
---|
44 | endif
|
---|
45 | if !defined(VBOX_ONLY_EXTPACKS) \
|
---|
46 | && ( defined(VBOX_WITH_DTRACE_R3) \
|
---|
47 | || defined(VBOX_WITH_DTRACE_R0) \
|
---|
48 | || defined(VBOX_WITH_DTRACE_RC))
|
---|
49 | PROGRAMS += tstVMStructDTrace
|
---|
50 | INSTALLS += VMMLibDTraceStructTest
|
---|
51 | endif
|
---|
52 | ifndef VBOX_ONLY_EXTPACKS_USE_IMPLIBS
|
---|
53 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
54 | PROGRAMS += tstGlobalConfigHardened
|
---|
55 | DLL += tstGlobalConfig
|
---|
56 | else
|
---|
57 | PROGRAMS += tstGlobalConfig
|
---|
58 | endif
|
---|
59 |
|
---|
60 | ifdef VBOX_WITH_RAW_MODE
|
---|
61 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
62 | PROGRAMS += tstVMMHardened
|
---|
63 | DLLS += tstVMM
|
---|
64 | else
|
---|
65 | PROGRAMS += tstVMM tstVMM-HM
|
---|
66 | endif
|
---|
67 | ifneq ($(KBUILD_TARGET),win)
|
---|
68 | PROGRAMS += tstVMMFork
|
---|
69 | endif
|
---|
70 | endif
|
---|
71 | ifdef VBOX_WITH_TESTCASES
|
---|
72 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
73 | PROGRAMS += tstCFGMHardened tstVMREQHardened tstAnimateHardened
|
---|
74 | DLLS += tstCFGM tstVMREQ tstAnimate
|
---|
75 | else
|
---|
76 | PROGRAMS += tstCFGM tstVMREQ tstAnimate
|
---|
77 | endif
|
---|
78 | PROGRAMS += \
|
---|
79 | tstCompressionBenchmark \
|
---|
80 | tstIEMCheckMc \
|
---|
81 | tstIEMAImpl \
|
---|
82 | tstPDMQueue \
|
---|
83 | tstSSM
|
---|
84 | PROGRAMS.amd64 += tstIEMAImplAsm
|
---|
85 |
|
---|
86 | if1of ($(KBUILD_TARGET_ARCH),amd64 x86)
|
---|
87 | PROGRAMS += \
|
---|
88 | tstVMMR0CallHost-1 \
|
---|
89 | tstX86-FpuSaveRestore
|
---|
90 | ifn1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), solaris.x86 solaris.amd64 win.amd64 ) ## TODO: Fix the code.
|
---|
91 | PROGRAMS += tstX86-1
|
---|
92 | endif
|
---|
93 | endif
|
---|
94 | ifdef VBOX_WITH_RAW_MODE
|
---|
95 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
96 | PROGRAMS += tstMicroHardened
|
---|
97 | DLLS += tstMicro
|
---|
98 | else
|
---|
99 | PROGRAMS += tstMicro
|
---|
100 | endif
|
---|
101 | SYSMODS += tstMicroRC
|
---|
102 | endif
|
---|
103 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
104 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
105 | PROGRAMS += tstPDMAsyncCompletionHardened tstPDMAsyncCompletionStressHardened
|
---|
106 | DLLS += tstPDMAsyncCompletion tstPDMAsyncCompletionStress
|
---|
107 | else
|
---|
108 | PROGRAMS += tstPDMAsyncCompletion tstPDMAsyncCompletionStress
|
---|
109 | endif
|
---|
110 | endif
|
---|
111 | endif # VBOX_WITH_TESTCASES
|
---|
112 | endif # !VBOX_ONLY_EXTPACKS_USE_IMPLIBS
|
---|
113 |
|
---|
114 | # Where we put our temporary files (just for simplicity)
|
---|
115 | VBOX_VMM_TESTCASE_OUT_DIR := $(PATH_TARGET)/VMM
|
---|
116 | BLDDIRS += $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
117 |
|
---|
118 | #
|
---|
119 | # We setup two 'other' targets for executing the two structure & alignment
|
---|
120 | # validation testcases. Perhaps a bit hackish, but extremely useful.
|
---|
121 | #
|
---|
122 | ifeq ($(KBUILD_TARGET),$(KBUILD_HOST))
|
---|
123 | ifeq ($(filter-out x86.x86 amd64.amd64 x86.amd64, $(KBUILD_TARGET_ARCH).$(KBUILD_HOST_ARCH)),)
|
---|
124 | OTHERS += \
|
---|
125 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
|
---|
126 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
|
---|
127 | endif
|
---|
128 | endif
|
---|
129 |
|
---|
130 | # The normal testing pass.
|
---|
131 | TESTING += \
|
---|
132 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
|
---|
133 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
|
---|
134 |
|
---|
135 | OTHER_CLEAN += \
|
---|
136 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run \
|
---|
137 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run \
|
---|
138 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o \
|
---|
139 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o.dep \
|
---|
140 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac \
|
---|
141 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac.o \
|
---|
142 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac.lst \
|
---|
143 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsRC.h \
|
---|
144 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h \
|
---|
145 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructRC.h
|
---|
146 |
|
---|
147 | #
|
---|
148 | # Globals
|
---|
149 | #
|
---|
150 | VBOX_PATH_VMM_SRC = $(PATH_ROOT)/src/VBox/VMM
|
---|
151 |
|
---|
152 | #
|
---|
153 | # Targets
|
---|
154 | #
|
---|
155 | ifdef VBOX_WITH_RAW_MODE
|
---|
156 | tstVMStructRC_TEMPLATE = VBoxRcExe
|
---|
157 | tstVMStructRC_DEFS = VBOX_IN_VMM IN_VMM_RC IN_DIS IN_RT_RC VBOX_WITH_RAW_MODE $(VMM_COMMON_DEFS)
|
---|
158 | ifdef VBOX_WITH_R0_LOGGING
|
---|
159 | tstVMStructRC_DEFS += VBOX_WITH_R0_LOGGING
|
---|
160 | endif
|
---|
161 | tstVMStructRC_SOURCES = tstVMStructRC.cpp
|
---|
162 | tstVMStructRC_INCS = \
|
---|
163 | $(VBOX_PATH_VMM_SRC)/include \
|
---|
164 | $(VBOX_PATH_VMM_SRC)/PATM
|
---|
165 | endif
|
---|
166 |
|
---|
167 | tstVMStructSize_TEMPLATE= VBOXR3AUTOTST
|
---|
168 | ifneq ($(KBUILD_TARGET),win)
|
---|
169 | tstVMStructSize_CXXFLAGS += $(VBOX_GCC_Wno-invalid-offsetof)
|
---|
170 | endif
|
---|
171 | tstVMStructSize_DEFS = VBOX_IN_VMM IN_VMM_R3 IN_DIS $(VMM_COMMON_DEFS)
|
---|
172 | ifdef VBOX_WITH_RAW_MODE
|
---|
173 | tstVMStructSize_DEFS += VBOX_WITH_RAW_MODE
|
---|
174 | endif
|
---|
175 | tstVMStructSize_INCS = \
|
---|
176 | $(VBOX_PATH_VMM_SRC)/include \
|
---|
177 | $(VBOX_PATH_VMM_SRC)/PATM \
|
---|
178 | $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
179 | tstVMStructSize_SOURCES = tstVMStructSize.cpp
|
---|
180 | ifdef VBOX_WITH_RAW_MODE
|
---|
181 | tstVMStructSize.cpp_DEPS= $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructRC.h
|
---|
182 | endif
|
---|
183 | ifdef VBOX_WITH_R0_LOGGING
|
---|
184 | tstVMStructSize_DEFS += VBOX_WITH_R0_LOGGING
|
---|
185 | endif
|
---|
186 |
|
---|
187 | tstAsmStructs_TEMPLATE = VBOXR3AUTOTST
|
---|
188 | ifneq ($(KBUILD_TARGET),win)
|
---|
189 | tstAsmStructSize_CXXFLAGS += $(VBOX_GCC_Wno-invalid-offsetof)
|
---|
190 | endif
|
---|
191 | tstAsmStructs_DEFS = VBOX_IN_VMM IN_VMM_R3 IN_DIS $(VMM_COMMON_DEFS)
|
---|
192 | ifdef VBOX_WITH_RAW_MODE
|
---|
193 | tstAsmStructs_DEFS += VBOX_WITH_RAW_MODE
|
---|
194 | endif
|
---|
195 | ifdef VBOX_WITH_R0_LOGGING
|
---|
196 | tstAsmStructs_DEFS += VBOX_WITH_R0_LOGGING
|
---|
197 | endif
|
---|
198 | tstAsmStructs_INCS = \
|
---|
199 | $(VBOX_PATH_VMM_SRC)/include \
|
---|
200 | $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
201 | tstAsmStructs_SOURCES = tstAsmStructs.cpp
|
---|
202 | tstAsmStructs.cpp_DEPS = $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h
|
---|
203 |
|
---|
204 | ifdef VBOX_WITH_RAW_MODE
|
---|
205 | tstAsmStructsRC_TEMPLATE= VBoxRcExe
|
---|
206 | tstAsmStructsRC_DEFS = VBOX_IN_VMM IN_VMM_RC IN_DIS IN_RT_RC VBOX_WITH_RAW_MODE $(VMM_COMMON_DEFS)
|
---|
207 | ifdef VBOX_WITH_R0_LOGGING
|
---|
208 | tstAsmStructsRC_DEFS += VBOX_WITH_R0_LOGGING
|
---|
209 | endif
|
---|
210 | tstAsmStructsRC_INCS = \
|
---|
211 | $(VBOX_PATH_VMM_SRC)/include \
|
---|
212 | $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
213 | tstAsmStructsRC_SOURCES = tstAsmStructs.cpp
|
---|
214 | tstAsmStructs.cpp_DEPS += $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsRC.h
|
---|
215 | endif # VBOX_WITH_RAW_MODE
|
---|
216 |
|
---|
217 |
|
---|
218 | #
|
---|
219 | # Global config tool.
|
---|
220 | #
|
---|
221 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
222 | tstGlobalConfigHardened_TEMPLATE = VBoxR3HardenedTstExe
|
---|
223 | tstGlobalConfigHardened_NAME = tstGlobalConfig
|
---|
224 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
225 | tstGlobalConfigHardened_DEFS = PROGRAM_NAME_STR="tstGlobalConfig"
|
---|
226 | else
|
---|
227 | tstGlobalConfigHardened_DEFS = PROGRAM_NAME_STR=\"tstGlobalConfig\"
|
---|
228 | endif
|
---|
229 | tstGlobalConfigHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
|
---|
230 | tstGlobalConfig_TEMPLATE = VBoxR3HardenedTstDll
|
---|
231 | else
|
---|
232 | tstGlobalConfig_TEMPLATE = VBOXR3TSTEXE
|
---|
233 | endif
|
---|
234 | tstGlobalConfig_SOURCES = tstGlobalConfig.cpp
|
---|
235 | tstGlobalConfig_LIBS = $(LIB_RUNTIME)
|
---|
236 |
|
---|
237 |
|
---|
238 | #
|
---|
239 | # Testcase for checking the C (IEMAllAImplC.cpp) and assembly (IEMAllAImpl.asm)
|
---|
240 | # instruction emulation helpers.
|
---|
241 | #
|
---|
242 | # Note! The IN_TSTVMSTRUCT define is for avoiding IEMInstructionStatisticsTmpl.h.
|
---|
243 | #
|
---|
244 | TSTIEMAIMPL_TEST_DATA_DEPS = \
|
---|
245 | tstIEMAImplDataSseBinary-addps_u128.bin \
|
---|
246 | tstIEMAImplDataSseBinary-mulps_u128.bin \
|
---|
247 | tstIEMAImplDataSseBinary-subps_u128.bin \
|
---|
248 | tstIEMAImplDataSseBinary-minps_u128.bin \
|
---|
249 | tstIEMAImplDataSseBinary-divps_u128.bin \
|
---|
250 | tstIEMAImplDataSseBinary-maxps_u128.bin \
|
---|
251 | tstIEMAImplDataSseBinary-haddps_u128.bin \
|
---|
252 | tstIEMAImplDataSseBinary-hsubps_u128.bin \
|
---|
253 | tstIEMAImplDataSseBinary-sqrtps_u128.bin \
|
---|
254 | tstIEMAImplDataSseBinary-addsubps_u128.bin \
|
---|
255 | tstIEMAImplDataSseBinary-cvtps2pd_u128.bin \
|
---|
256 | tstIEMAImplDataSseBinary-addpd_u128.bin \
|
---|
257 | tstIEMAImplDataSseBinary-mulpd_u128.bin \
|
---|
258 | tstIEMAImplDataSseBinary-subpd_u128.bin \
|
---|
259 | tstIEMAImplDataSseBinary-minpd_u128.bin \
|
---|
260 | tstIEMAImplDataSseBinary-divpd_u128.bin \
|
---|
261 | tstIEMAImplDataSseBinary-maxpd_u128.bin \
|
---|
262 | tstIEMAImplDataSseBinary-haddpd_u128.bin \
|
---|
263 | tstIEMAImplDataSseBinary-hsubpd_u128.bin \
|
---|
264 | tstIEMAImplDataSseBinary-sqrtpd_u128.bin \
|
---|
265 | tstIEMAImplDataSseBinary-addsubpd_u128.bin \
|
---|
266 | tstIEMAImplDataSseBinary-cvtpd2ps_u128.bin \
|
---|
267 | tstIEMAImplDataSseBinary-addss_u128_r32.bin \
|
---|
268 | tstIEMAImplDataSseBinary-addsd_u128_r64.bin \
|
---|
269 | tstIEMAImplDataSseBinary-mulss_u128_r32.bin \
|
---|
270 | tstIEMAImplDataSseBinary-mulsd_u128_r64.bin \
|
---|
271 | tstIEMAImplDataSseBinary-subss_u128_r32.bin \
|
---|
272 | tstIEMAImplDataSseBinary-subsd_u128_r64.bin \
|
---|
273 | tstIEMAImplDataSseBinary-minss_u128_r32.bin \
|
---|
274 | tstIEMAImplDataSseBinary-minsd_u128_r64.bin \
|
---|
275 | tstIEMAImplDataSseBinary-divss_u128_r32.bin \
|
---|
276 | tstIEMAImplDataSseBinary-divsd_u128_r64.bin \
|
---|
277 | tstIEMAImplDataSseBinary-maxss_u128_r32.bin \
|
---|
278 | tstIEMAImplDataSseBinary-maxsd_u128_r64.bin \
|
---|
279 | tstIEMAImplDataSseBinary-cvtss2sd_u128_r32.bin \
|
---|
280 | tstIEMAImplDataSseBinary-cvtsd2ss_u128_r64.bin \
|
---|
281 | tstIEMAImplDataSseBinary-sqrtss_u128_r32.bin \
|
---|
282 | tstIEMAImplDataSseBinary-sqrtsd_u128_r64.bin \
|
---|
283 | tstIEMAImplDataSseBinary-cvttsd2si_i32_r64.bin \
|
---|
284 | tstIEMAImplDataSseBinary-cvtsd2si_i32_r64.bin \
|
---|
285 | tstIEMAImplDataSseBinary-cvttsd2si_i64_r64.bin \
|
---|
286 | tstIEMAImplDataSseBinary-cvtsd2si_i64_r64.bin \
|
---|
287 | tstIEMAImplDataSseBinary-cvttss2si_i32_r32.bin \
|
---|
288 | tstIEMAImplDataSseBinary-cvtss2si_i32_r32.bin \
|
---|
289 | tstIEMAImplDataSseBinary-cvttss2si_i64_r32.bin \
|
---|
290 | tstIEMAImplDataSseBinary-cvtss2si_i64_r32.bin \
|
---|
291 | tstIEMAImplDataSseBinary-cvtsi2ss_r32_i32.bin \
|
---|
292 | tstIEMAImplDataSseBinary-cvtsi2ss_r32_i64.bin \
|
---|
293 | tstIEMAImplDataSseBinary-cvtsi2sd_r64_i32.bin \
|
---|
294 | tstIEMAImplDataSseBinary-cvtsi2sd_r64_i64.bin \
|
---|
295 | tstIEMAImplDataSseCompare-ucomiss_u128.bin \
|
---|
296 | tstIEMAImplDataSseCompare-vucomiss_u128.bin \
|
---|
297 | tstIEMAImplDataSseCompare-comiss_u128.bin \
|
---|
298 | tstIEMAImplDataSseCompare-vcomiss_u128.bin \
|
---|
299 | tstIEMAImplDataSseCompare-ucomisd_u128.bin \
|
---|
300 | tstIEMAImplDataSseCompare-vucomisd_u128.bin \
|
---|
301 | tstIEMAImplDataSseCompare-comisd_u128.bin \
|
---|
302 | tstIEMAImplDataSseCompare-vcomisd_u128.bin \
|
---|
303 | tstIEMAImplDataSseCompare-cmpps_u128.bin \
|
---|
304 | tstIEMAImplDataSseCompare-cmpss_u128.bin \
|
---|
305 | tstIEMAImplDataSseCompare-cmppd_u128.bin \
|
---|
306 | tstIEMAImplDataSseCompare-cmpsd_u128.bin \
|
---|
307 | tstIEMAImplDataSseConvert-cvtdq2ps_u128.bin \
|
---|
308 | tstIEMAImplDataSseConvert-cvtps2dq_u128.bin \
|
---|
309 | tstIEMAImplDataSseConvert-cvttps2dq_u128.bin \
|
---|
310 | tstIEMAImplDataSseConvert-cvtdq2pd_u128.bin \
|
---|
311 | tstIEMAImplDataSseConvert-cvtpd2dq_u128.bin \
|
---|
312 | tstIEMAImplDataSseConvert-cvttpd2dq_u128.bin \
|
---|
313 | tstIEMAImplDataSseConvert-cvtpd2pi_u128.bin \
|
---|
314 | tstIEMAImplDataSseConvert-cvttpd2pi_u128.bin \
|
---|
315 | tstIEMAImplDataSseConvert-cvtpi2ps_u128.bin \
|
---|
316 | tstIEMAImplDataSseConvert-cvtpi2pd_u128.bin \
|
---|
317 | tstIEMAImplDataSseConvert-cvtps2pi_u128.bin \
|
---|
318 | tstIEMAImplDataSseConvert-cvttps2pi_u128.bin
|
---|
319 |
|
---|
320 | tstIEMAImpl_TEMPLATE = VBOXR3TSTEXE
|
---|
321 | tstIEMAImpl_DEFS = $(VMM_COMMON_DEFS) IEM_WITHOUT_ASSEMBLY IN_TSTVMSTRUCT
|
---|
322 | tstIEMAImpl_SDKS = VBOX_SOFTFLOAT
|
---|
323 | tstIEMAImpl_INCS = ../include .
|
---|
324 | tstIEMAImpl_CLEAN = \
|
---|
325 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataInt.cpp \
|
---|
326 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataInt-Amd.cpp \
|
---|
327 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataInt-Intel.cpp \
|
---|
328 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuLdSt.cpp \
|
---|
329 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuLdSt-Amd.cpp \
|
---|
330 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuLdSt-Intel.cpp \
|
---|
331 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary1.cpp \
|
---|
332 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary1-Amd.cpp \
|
---|
333 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary1-Intel.cpp \
|
---|
334 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuBinary2.cpp \
|
---|
335 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther.cpp \
|
---|
336 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther-Amd.cpp \
|
---|
337 | $(tstIEMAImpl_0_OUTDIR)/tstIEMAImplDataFpuOther-Intel.cpp
|
---|
338 | tstIEMAImpl_SOURCES = \
|
---|
339 | tstIEMAImpl.cpp \
|
---|
340 | ../VMMAll/IEMAllAImplC.cpp \
|
---|
341 | $(tstIEMAImpl_CLEAN)
|
---|
342 | tstIEMAImpl_SOURCES.x86 += tstIEMAImplDataSseBinary.asm
|
---|
343 | tstIEMAImpl_SOURCES.amd64 += tstIEMAImplDataSseBinary.asm
|
---|
344 | tstIEMAImplDataSseBinary.asm_DEPS = \
|
---|
345 | $(TSTIEMAIMPL_TEST_DATA_DEPS)
|
---|
346 |
|
---|
347 | tstIEMAImpl_SOURCES.arm64 += tstIEMAImplDataSseBinary.S
|
---|
348 | tstIEMAImplDataSseBinary.S_DEPS = \
|
---|
349 | $(TSTIEMAIMPL_TEST_DATA_DEPS)
|
---|
350 | $(call KB_FN_DO_PASS0_ON_TARGET,tstIEMAImpl)
|
---|
351 |
|
---|
352 | # This variant mainly for generating data.
|
---|
353 | tstIEMAImplAsm_TEMPLATE = VBOXR3TSTEXE
|
---|
354 | tstIEMAImplAsm_SDKS = VBOX_SOFTFLOAT
|
---|
355 | tstIEMAImplAsm_DEFS = $(VMM_COMMON_DEFS) IEM_WITH_ASSEMBLY IN_TSTVMSTRUCT TSTIEMAIMPL_WITH_GENERATOR
|
---|
356 | tstIEMAImplAsm_INCS = ../include .
|
---|
357 | tstIEMAImplAsm_SOURCES = \
|
---|
358 | tstIEMAImpl.cpp \
|
---|
359 | ../VMMAll/IEMAllAImpl.asm \
|
---|
360 | ../VMMAll/IEMAllAImplC.cpp \
|
---|
361 | $(tstIEMAImpl_CLEAN)
|
---|
362 | tstIEMAImplAsm_SOURCES.x86 += tstIEMAImplDataSseBinary.asm
|
---|
363 | tstIEMAImplAsm_SOURCES.amd64 += tstIEMAImplDataSseBinary.asm
|
---|
364 | tstIEMAImplDataSseBinary.asm_DEPS = \
|
---|
365 | $(TSTIEMAIMPL_TEST_DATA_DEPS)
|
---|
366 |
|
---|
367 | tstIEMAImplAsm_SOURCES.arm64 += tstIEMAImplDataSseBinary.S
|
---|
368 | tstIEMAImplDataSseBinary.S_DEPS = \
|
---|
369 | $(TSTIEMAIMPL_TEST_DATA_DEPS)
|
---|
370 |
|
---|
371 | ## @param 1 The sub-name of the file in question.
|
---|
372 | define def_tstIEMAImplData_adjust
|
---|
373 | $$(tstIEMAImpl_0_OUTDIR)/tstIEMAImplData$(1).cpp: \
|
---|
374 | $$(tstIEMAImpl_DEFPATH)/tstIEMAImplData$(1).cpp \
|
---|
375 | $$(tstIEMAImpl_DEFPATH)/tstIEMAImplData.sh \
|
---|
376 | $$(tstIEMAImpl_DEFPATH)/tstIEMAImpl.h \
|
---|
377 | | $$(tstIEMAImpl_0_OUTDIR)/
|
---|
378 | $$(ASH) "$$(tstIEMAImpl_DEFPATH)/tstIEMAImplData.sh" \
|
---|
379 | "$$(CP_EXT)" \
|
---|
380 | "$$(MV_EXT)" \
|
---|
381 | "$$(SED_EXT)" \
|
---|
382 | "$$(APPEND_EXT)" \
|
---|
383 | "$$(tstIEMAImpl_0_OUTDIR)" \
|
---|
384 | "$$(tstIEMAImpl_DEFPATH)" \
|
---|
385 | "$(1)"
|
---|
386 | endef
|
---|
387 | $(evalcall2 def_tstIEMAImplData_adjust,Int)
|
---|
388 | $(evalcall2 def_tstIEMAImplData_adjust,Int-Amd)
|
---|
389 | $(evalcall2 def_tstIEMAImplData_adjust,Int-Intel)
|
---|
390 | $(evalcall2 def_tstIEMAImplData_adjust,FpuLdSt)
|
---|
391 | $(evalcall2 def_tstIEMAImplData_adjust,FpuLdSt-Amd)
|
---|
392 | $(evalcall2 def_tstIEMAImplData_adjust,FpuLdSt-Intel)
|
---|
393 | $(evalcall2 def_tstIEMAImplData_adjust,FpuBinary1)
|
---|
394 | $(evalcall2 def_tstIEMAImplData_adjust,FpuBinary1-Amd)
|
---|
395 | $(evalcall2 def_tstIEMAImplData_adjust,FpuBinary1-Intel)
|
---|
396 | $(evalcall2 def_tstIEMAImplData_adjust,FpuBinary2)
|
---|
397 | $(evalcall2 def_tstIEMAImplData_adjust,FpuOther)
|
---|
398 | $(evalcall2 def_tstIEMAImplData_adjust,FpuOther-Amd)
|
---|
399 | $(evalcall2 def_tstIEMAImplData_adjust,FpuOther-Intel)
|
---|
400 |
|
---|
401 |
|
---|
402 | #
|
---|
403 | # Testcase for checking the repurposing of the IEM instruction code.
|
---|
404 | #
|
---|
405 | tstIEMCheckMc_TEMPLATE = VBOXR3TSTEXE
|
---|
406 | tstIEMCheckMc_SOURCES = tstIEMCheckMc.cpp
|
---|
407 | tstIEMCheckMc_DEFS = $(VMM_COMMON_DEFS)
|
---|
408 | tstIEMCheckMc_LIBS = $(LIB_RUNTIME)
|
---|
409 | ifeq ($(KBUILD_TARGET),win)
|
---|
410 | tstIEMCheckMc_CXXFLAGS = $(VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS) -wd4189 # local variable is initialized but not used.
|
---|
411 | else
|
---|
412 | tstIEMCheckMc_CXXFLAGS = $(VBOX_C_CXX_FLAGS_NO_UNUSED_PARAMETERS) -Wno-unused-value -Wno-unused-variable
|
---|
413 | endif
|
---|
414 |
|
---|
415 | #
|
---|
416 | # Saved state manager testcase.
|
---|
417 | #
|
---|
418 | tstSSM_TEMPLATE = VBOXR3TSTEXE
|
---|
419 | tstSSM_INCS = $(VBOX_PATH_VMM_SRC)/include
|
---|
420 | tstSSM_DEFS = $(VMM_COMMON_DEFS)
|
---|
421 | tstSSM_SOURCES = tstSSM.cpp
|
---|
422 | tstSSM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
423 |
|
---|
424 | #
|
---|
425 | # VMM configuration manager tests.
|
---|
426 | #
|
---|
427 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
428 | tstCFGMHardened_TEMPLATE = VBoxR3HardenedTstExe
|
---|
429 | tstCFGMHardened_NAME = tstCFGM
|
---|
430 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
431 | tstCFGMHardened_DEFS = PROGRAM_NAME_STR="tstCFGM"
|
---|
432 | else
|
---|
433 | tstCFGMHardened_DEFS = PROGRAM_NAME_STR=\"tstCFGM\"
|
---|
434 | endif
|
---|
435 | tstCFGMHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplateTestcase.cpp
|
---|
436 | tstCFGM_TEMPLATE = VBoxR3HardenedTstDll
|
---|
437 | else
|
---|
438 | tstCFGM_TEMPLATE = VBOXR3TSTEXE
|
---|
439 | endif
|
---|
440 | tstCFGM_DEFS = $(VMM_COMMON_DEFS)
|
---|
441 | tstCFGM_SOURCES = tstCFGM.cpp
|
---|
442 | tstCFGM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
443 |
|
---|
444 | #
|
---|
445 | # Comparing some compression algorithms considered for SSM usage.
|
---|
446 | #
|
---|
447 | tstCompressionBenchmark_TEMPLATE = VBOXR3TSTEXE
|
---|
448 | tstCompressionBenchmark_SOURCES = tstCompressionBenchmark.cpp
|
---|
449 |
|
---|
450 | #
|
---|
451 | # Two testcases for checking the ring-0 setjmp/longjmp code.
|
---|
452 | #
|
---|
453 | tstVMMR0CallHost-1_TEMPLATE = VBOXR3TSTEXE
|
---|
454 | tstVMMR0CallHost-1_INCS = $(VBOX_PATH_VMM_SRC)/include
|
---|
455 | tstVMMR0CallHost-1_SOURCES = \
|
---|
456 | tstVMMR0CallHost-1.cpp
|
---|
457 | tstVMMR0CallHost-1_SOURCES.amd64 = \
|
---|
458 | $(VBOX_PATH_VMM_SRC)/VMMR0/VMMR0JmpA-amd64.asm
|
---|
459 | tstVMMR0CallHost-1_SOURCES.x86 = \
|
---|
460 | $(VBOX_PATH_VMM_SRC)/VMMR0/VMMR0JmpA-x86.asm
|
---|
461 |
|
---|
462 |
|
---|
463 | #
|
---|
464 | # For testing the VM request queue code.
|
---|
465 | #
|
---|
466 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
467 | tstVMREQHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
468 | tstVMREQHardened_NAME = tstVMREQ
|
---|
469 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
470 | tstVMREQHardened_DEFS = PROGRAM_NAME_STR="tstVMREQ"
|
---|
471 | else
|
---|
472 | tstVMREQHardened_DEFS = PROGRAM_NAME_STR=\"tstVMREQ\"
|
---|
473 | endif
|
---|
474 | tstVMREQHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
|
---|
475 | tstVMREQ_TEMPLATE = VBOXR3
|
---|
476 | else
|
---|
477 | tstVMREQ_TEMPLATE = VBOXR3EXE
|
---|
478 | endif
|
---|
479 | tstVMREQ_DEFS = $(VMM_COMMON_DEFS)
|
---|
480 | tstVMREQ_SOURCES = tstVMREQ.cpp
|
---|
481 | tstVMREQ_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
482 |
|
---|
483 | #
|
---|
484 | # Tool for reanimate things like OS/2 dumps.
|
---|
485 | #
|
---|
486 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
487 | tstAnimateHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
488 | tstAnimateHardened_NAME = tstAnimate
|
---|
489 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
490 | tstAnimateHardened_DEFS = PROGRAM_NAME_STR="tstAnimate"
|
---|
491 | else
|
---|
492 | tstAnimateHardened_DEFS = PROGRAM_NAME_STR=\"tstAnimate\"
|
---|
493 | endif
|
---|
494 | tstAnimateHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
|
---|
495 | tstAnimate_TEMPLATE = VBOXR3
|
---|
496 | else
|
---|
497 | tstAnimate_TEMPLATE = VBOXR3EXE
|
---|
498 | endif
|
---|
499 | tstAnimate_DEFS = $(VMM_COMMON_DEFS)
|
---|
500 | tstAnimate_SOURCES = tstAnimate.cpp
|
---|
501 | tstAnimate_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
502 |
|
---|
503 | tstX86-1_TEMPLATE = VBOXR3TSTEXE
|
---|
504 | tstX86-1_SOURCES = tstX86-1.cpp tstX86-1A.asm
|
---|
505 | tstX86-1_LIBS = $(LIB_RUNTIME)
|
---|
506 | tstX86-1_LDFLAGS.linux = $(VBOX_GCC_no-pie)
|
---|
507 |
|
---|
508 | tstX86-FpuSaveRestore_TEMPLATE = VBOXR3TSTEXE
|
---|
509 | tstX86-FpuSaveRestore_SOURCES = tstX86-FpuSaveRestore.cpp tstX86-FpuSaveRestoreA.asm
|
---|
510 | tstX86-FpuSaveRestore_LIBS = $(LIB_RUNTIME)
|
---|
511 |
|
---|
512 | ifdef VBOX_WITH_RAW_MODE
|
---|
513 |
|
---|
514 | #
|
---|
515 | # Raw-mode VMM testcase.
|
---|
516 | #
|
---|
517 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
518 | tstVMMHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
519 | tstVMMHardened_NAME = tstVMM
|
---|
520 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
521 | tstVMMHardened_DEFS = PROGRAM_NAME_STR="tstVMM"
|
---|
522 | else
|
---|
523 | tstVMMHardened_DEFS = PROGRAM_NAME_STR=\"tstVMM\"
|
---|
524 | endif
|
---|
525 | tstVMMHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
|
---|
526 | tstVMM_TEMPLATE = VBOXR3
|
---|
527 | else
|
---|
528 | tstVMM_TEMPLATE = VBOXR3EXE
|
---|
529 | endif
|
---|
530 | tstVMM_SOURCES = tstVMM.cpp
|
---|
531 | tstVMM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
532 |
|
---|
533 | #
|
---|
534 | # HM VMM testcase.
|
---|
535 | #
|
---|
536 | tstVMM-HM_TEMPLATE = VBOXR3EXE
|
---|
537 | tstVMM-HM_SOURCES = tstVMM-HM.cpp
|
---|
538 | tstVMM-HM_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
539 |
|
---|
540 | #
|
---|
541 | # VMM host process fork test case (memory ++).
|
---|
542 | #
|
---|
543 | tstVMMFork_TEMPLATE = VBOXR3EXE
|
---|
544 | tstVMMFork_SOURCES = tstVMMFork.cpp
|
---|
545 | tstVMMFork_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
546 |
|
---|
547 | #
|
---|
548 | # Raw-mode micro benchmark.
|
---|
549 | #
|
---|
550 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
551 | tstMicroHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
552 | tstMicroHardened_NAME = tstMicro
|
---|
553 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
554 | tstMicroHardened_DEFS = PROGRAM_NAME_STR="tstMicro"
|
---|
555 | else
|
---|
556 | tstMicroHardened_DEFS = PROGRAM_NAME_STR=\"tstMicro\"
|
---|
557 | endif
|
---|
558 | tstMicroHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
|
---|
559 | tstMicro_TEMPLATE = VBOXR3
|
---|
560 | else
|
---|
561 | tstMicro_TEMPLATE = VBOXR3EXE
|
---|
562 | endif
|
---|
563 | tstMicro_SOURCES = tstMicro.cpp
|
---|
564 | tstMicro_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
565 | tstMicro_DEFS = $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,)
|
---|
566 |
|
---|
567 | tstMicroRC_TEMPLATE = VBoxRc
|
---|
568 | tstMicroRC_SOURCES = tstMicroRC.cpp tstMicroRCA.asm
|
---|
569 | tstMicroRC_DEFS = $(if $(VBOX_WITH_RAW_MODE),VBOX_WITH_RAW_MODE,)
|
---|
570 | tstMicroRC_INCS = $(VBOX_PATH_VMM_SRC)/testcase
|
---|
571 | ifeq ($(VBOX_LDR_FMT32),pe)
|
---|
572 | tstMicroRC_LDFLAGS = -Entry:tstMicroRC
|
---|
573 | endif
|
---|
574 | tstMicroRC_SYSSUFF = .gc
|
---|
575 | tstMicroRC_LIBS = \
|
---|
576 | $(PATH_STAGE_LIB)/DisasmRC$(VBOX_SUFF_LIB) \
|
---|
577 | $(PATH_STAGE_LIB)/RuntimeRC$(VBOX_SUFF_LIB)
|
---|
578 | ifeq ($(filter-out pe lx,$(VBOX_LDR_FMT32)),)
|
---|
579 | tstMicroRC_LIBS += \
|
---|
580 | $(PATH_STAGE_LIB)/VMMRCBuiltin$(VBOX_SUFF_LIB) \
|
---|
581 | $(LIB_VMMRC)
|
---|
582 | endif
|
---|
583 | tstMicroRC_SOURCES.win = tstMicroRC.def
|
---|
584 |
|
---|
585 | endif # VBOX_WITH_RAW_MODE
|
---|
586 |
|
---|
587 |
|
---|
588 | if !defined(VBOX_ONLY_EXTPACKS_USE_IMPLIBS)
|
---|
589 | #
|
---|
590 | # Special NEM host testcase.
|
---|
591 | #
|
---|
592 | if ("$(KBUILD_TARGET_ARCH).$(KBUILD_TARGET_ARCH)" == "darwin.amd64" && (defined(VBOX_WITH_NATIVE_NEM) || "$(USERNAME)" == "bird")) \
|
---|
593 | || ("$(KBUILD_TARGET_ARCH).$(KBUILD_TARGET_ARCH)" == "linux.amd64" && (defined(VBOX_WITH_NATIVE_NEM) || "$(USERNAME)" == "bird")) \
|
---|
594 | || ("$(KBUILD_TARGET_ARCH).$(KBUILD_TARGET_ARCH)" == "win.amd64" && defined(VBOX_WITH_NATIVE_NEM))
|
---|
595 | PROGRAMS += NemRawBench-1
|
---|
596 | NemRawBench-1_TEMPLATE = VBoxR3Static
|
---|
597 | NemRawBench-1_SOURCES = NemRawBench-1.cpp
|
---|
598 | NemRawBench-1_BLD_TYPE = release
|
---|
599 | NemRawBench-1_INCS.win = \
|
---|
600 | $(KBUILD_DEVTOOLS)/win.x86/sdk/v10.0.17134.0/include/10.0.17134.0/um \
|
---|
601 | $(KBUILD_DEVTOOLS)/win.x86/sdk/v10.0.17134.0/include/10.0.17134.0/shared
|
---|
602 | NemRawBench-1_CXXFLAGS.darwin = \
|
---|
603 | -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform//Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks
|
---|
604 | #NemRawBench-1_LDFLAGS.darwin = \
|
---|
605 | # -F/System/Library/Frameworks \
|
---|
606 | # -framework Hypervisor
|
---|
607 | NemRawBench-1_LDFLAGS.darwin = \
|
---|
608 | /System/Library/Frameworks/Hypervisor.framework/Hypervisor
|
---|
609 | endif
|
---|
610 | endif
|
---|
611 |
|
---|
612 | #
|
---|
613 | # PDM Queue tests.
|
---|
614 | #
|
---|
615 | tstPDMQueue_TEMPLATE := VBOXR3EXE
|
---|
616 | tstPDMQueue_DEFS = $(VMM_COMMON_DEFS)
|
---|
617 | tstPDMQueue_SOURCES := tstPDMQueue.cpp
|
---|
618 | tstPDMQueue_LIBS := $(LIB_VMM) $(LIB_RUNTIME)
|
---|
619 |
|
---|
620 |
|
---|
621 | ifdef VBOX_WITH_PDM_ASYNC_COMPLETION
|
---|
622 | #
|
---|
623 | # PDM asynchronous completation test.
|
---|
624 | #
|
---|
625 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
626 | tstPDMAsyncCompletionHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
627 | tstPDMAsyncCompletionHardened_NAME = tstPDMAsyncCompletion
|
---|
628 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
629 | tstPDMAsyncCompletionHardened_DEFS = PROGRAM_NAME_STR="tstPDMAsyncCompletion"
|
---|
630 | else
|
---|
631 | tstPDMAsyncCompletionHardened_DEFS = PROGRAM_NAME_STR=\"tstPDMAsyncCompletion\"
|
---|
632 | endif
|
---|
633 | tstPDMAsyncCompletionHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
|
---|
634 | tstPDMAsyncCompletion_TEMPLATE = VBOXR3
|
---|
635 | else
|
---|
636 | tstPDMAsyncCompletion_TEMPLATE = VBOXR3EXE
|
---|
637 | endif
|
---|
638 | tstPDMAsyncCompletion_DEFS = $(VMM_COMMON_DEFS)
|
---|
639 | tstPDMAsyncCompletion_INCS = $(VBOX_PATH_VMM_SRC)/include
|
---|
640 | tstPDMAsyncCompletion_SOURCES = tstPDMAsyncCompletion.cpp
|
---|
641 | tstPDMAsyncCompletion_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
642 |
|
---|
643 | #
|
---|
644 | # PDM asynchronous completation stress test.
|
---|
645 | #
|
---|
646 | if defined(VBOX_WITH_HARDENING) && "$(KBUILD_TARGET)" == "win"
|
---|
647 | tstPDMAsyncCompletionStressHardened_TEMPLATE = VBOXR3HARDENEDEXE
|
---|
648 | tstPDMAsyncCompletionStressHardened_NAME = tstPDMAsyncCompletionStress
|
---|
649 | ifdef VBOX_WITH_AUTOMATIC_DEFS_QUOTING
|
---|
650 | tstPDMAsyncCompletionStressHardened_DEFS = PROGRAM_NAME_STR="tstPDMAsyncCompletionStress"
|
---|
651 | else
|
---|
652 | tstPDMAsyncCompletionStressHardened_DEFS = PROGRAM_NAME_STR=\"tstPDMAsyncCompletionStress\"
|
---|
653 | endif
|
---|
654 | tstPDMAsyncCompletionStressHardened_SOURCES = ../../HostDrivers/Support/SUPR3HardenedMainTemplate.cpp
|
---|
655 | tstPDMAsyncCompletionStress_TEMPLATE = VBOXR3
|
---|
656 | else
|
---|
657 | tstPDMAsyncCompletionStress_TEMPLATE = VBOXR3EXE
|
---|
658 | endif
|
---|
659 | tstPDMAsyncCompletionStress_DEFS = $(VMM_COMMON_DEFS)
|
---|
660 | tstPDMAsyncCompletionStress_INCS = $(VBOX_PATH_VMM_SRC)/include
|
---|
661 | tstPDMAsyncCompletionStress_SOURCES = tstPDMAsyncCompletionStress.cpp
|
---|
662 | tstPDMAsyncCompletionStress_LIBS = $(LIB_VMM) $(LIB_REM) $(LIB_RUNTIME)
|
---|
663 | endif
|
---|
664 |
|
---|
665 | ifndef VBOX_ONLY_EXTPACKS
|
---|
666 | PROGRAMS += tstSSM-2
|
---|
667 | tstSSM-2_TEMPLATE = VBOXR3TSTEXE
|
---|
668 | tstSSM-2_DEFS = IN_VMM_STATIC
|
---|
669 | tstSSM-2_SOURCES = tstSSM-2.cpp
|
---|
670 | tstSSM-2_LIBS = $(PATH_STAGE_LIB)/SSMStandalone$(VBOX_SUFF_LIB)
|
---|
671 | endif
|
---|
672 |
|
---|
673 | #
|
---|
674 | # Generate VM structure tests.
|
---|
675 | #
|
---|
676 | if !defined(VBOX_ONLY_EXTPACKS) \
|
---|
677 | && ( defined(VBOX_WITH_DTRACE_R3) \
|
---|
678 | || defined(VBOX_WITH_DTRACE_R0) \
|
---|
679 | || defined(VBOX_WITH_DTRACE_RC))
|
---|
680 | tstVMStructDTrace_TEMPLATE = VBOXR3AUTOTST
|
---|
681 | tstVMStructDTrace_DEFS = VBOX_IN_VMM IN_VMM_R3 IN_DIS $(VMM_COMMON_DEFS)
|
---|
682 | ifdef VBOX_WITH_RAW_MODE
|
---|
683 | tstVMStructDTrace_DEFS += VBOX_WITH_RAW_MODE
|
---|
684 | endif
|
---|
685 | tstVMStructDTrace_INCS = \
|
---|
686 | $(VBOX_PATH_VMM_SRC)/include \
|
---|
687 | $(VBOX_PATH_VMM_SRC)/PATM \
|
---|
688 | $(VBOX_VMM_TESTCASE_OUT_DIR)
|
---|
689 | tstVMStructDTrace_SOURCES = tstVMStructDTrace.cpp
|
---|
690 | ifdef VBOX_WITH_R0_LOGGING
|
---|
691 | tstVMStructDTrace_DEFS += VBOX_WITH_R0_LOGGING
|
---|
692 | endif
|
---|
693 |
|
---|
694 |
|
---|
695 | VMMLibDTraceStructTest_INST = $(VBOX_INST_DTRACE_TST)$(KBUILD_TARGET_ARCH)/
|
---|
696 | VMMLibDTraceStructTest_SOURCES = \
|
---|
697 | $(tstVMStructDTrace_0_OUTDIR)/vbox-vm-struct-test.d
|
---|
698 | VMMLibDTraceStructTest_CLEAN = \
|
---|
699 | $(tstVMStructDTrace_0_OUTDIR)/vbox-vm-struct-test.d
|
---|
700 |
|
---|
701 | $$(tstVMStructDTrace_0_OUTDIR)/vbox-vm-struct-test.d: \
|
---|
702 | $$(tstVMStructDTrace_1_STAGE_TARGET) | $$(dir $$@)
|
---|
703 | $(QUIET)$(RM) -f $@
|
---|
704 | $< > $@
|
---|
705 |
|
---|
706 | endif
|
---|
707 |
|
---|
708 |
|
---|
709 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
710 |
|
---|
711 |
|
---|
712 | #
|
---|
713 | # Some handcrafted support targets for tstAsmStructs.
|
---|
714 | #
|
---|
715 | MY_ASA_ASM_STUFF = \
|
---|
716 | $(addprefix -D, \
|
---|
717 | $(DEFS) \
|
---|
718 | $(DEFS.$(KBUILD_TYPE)) \
|
---|
719 | $(DEFS.$(KBUILD_TARGET)) \
|
---|
720 | IN_RING3 $(ARCH_BITS_DEFS) \
|
---|
721 | $(DEFS.$(KBUILD_TARGET_ARCH)) \
|
---|
722 | $(DEFS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH)) \
|
---|
723 | $(VMM_COMMON_DEFS) \
|
---|
724 | ) \
|
---|
725 | -f $(if $(eq $(KBUILD_TARGET),darwin),macho,elf) \
|
---|
726 | $(foreach inc,$(INCS) $(VBOX_PATH_VMM_SRC)/testcase $(VBOX_PATH_VMM_SRC)/include $(VBOX_VMM_TESTCASE_OUT_DIR)\
|
---|
727 | ,-I$(inc)/)
|
---|
728 |
|
---|
729 | # 1a. make a header file which makes all the structures+members globals.
|
---|
730 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac: \
|
---|
731 | $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
|
---|
732 | $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed \
|
---|
733 | $(DEPTH)/include/iprt/asmdefs.mac \
|
---|
734 | $(DEPTH)/include/VBox/vmm/cpum.mac \
|
---|
735 | $(DEPTH)/include/VBox/vmm/vm.mac \
|
---|
736 | $(DEPTH)/include/VBox/vmm/gvm.mac \
|
---|
737 | $(DEPTH)/include/VBox/sup.mac \
|
---|
738 | $(DEPTH)/include/iprt/x86.mac \
|
---|
739 | $(VBOX_PATH_VMM_SRC)/include/CPUMInternal.mac \
|
---|
740 | $(VBOX_PATH_VMM_SRC)/include/HMInternal.mac \
|
---|
741 | $(VBOX_PATH_VMM_SRC)/include/VMMInternal.mac \
|
---|
742 | $(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
|
---|
743 | $(PATH_ROOT)/Config.kmk $(LOCALCFG) $(AUTOCFG) \
|
---|
744 | | $$(dir $$@)
|
---|
745 | $(call MSG_GENERATE,tstVMStructSize,$@,$<)
|
---|
746 | ifndef DONT_USE_YASM
|
---|
747 | $(QUIET)$(TOOL_YASM_AS) $(MY_ASA_ASM_STUFF) -o [email protected] -l [email protected] $<
|
---|
748 | $(SED) -f $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm-lst.sed --output $@ [email protected]
|
---|
749 | else
|
---|
750 | $(QUIET)$(TOOL_NASM_AS) -g $(MY_ASA_ASM_STUFF) -o [email protected] -l [email protected] $<
|
---|
751 | $(VBOX_NM) [email protected] | $(SED) \
|
---|
752 | -e '/[0-9a-fA-F][0-9a-fA-F]* [^a] /d' \
|
---|
753 | -e 's/[0-9a-fA-F][0-9a-fA-F]* a \([^ ]*\)/global \1/' \
|
---|
754 | > $@
|
---|
755 | endif
|
---|
756 |
|
---|
757 | # 1b. make an elf/macho object containing the offsets.
|
---|
758 | includedep $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o.dep
|
---|
759 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o: \
|
---|
760 | $(VBOX_PATH_VMM_SRC)/testcase/tstAsmStructsAsm.asm \
|
---|
761 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.mac \
|
---|
762 | $(DEPTH)/include/iprt/asmdefs.mac \
|
---|
763 | $(DEPTH)/include/VBox/vmm/cpum.mac \
|
---|
764 | $(DEPTH)/include/VBox/vmm/hm_vmx.mac \
|
---|
765 | $(DEPTH)/include/VBox/vmm/stam.mac \
|
---|
766 | $(DEPTH)/include/VBox/vmm/vm.mac \
|
---|
767 | $(DEPTH)/include/VBox/sup.mac \
|
---|
768 | $(DEPTH)/include/iprt/x86.mac \
|
---|
769 | $(VBOX_PATH_VMM_SRC)/include/CPUMInternal.mac \
|
---|
770 | $(VBOX_PATH_VMM_SRC)/include/HMInternal.mac \
|
---|
771 | $(VBOX_PATH_VMM_SRC)/include/VMMInternal.mac \
|
---|
772 | $(VBOX_PATH_VMM_SRC)/testcase/Makefile.kmk \
|
---|
773 | $$(if $$(eq $$(tstAsmStructsAsmDep_STUFF),$$(MY_ASA_ASM_STUFF)),,FORCE) \
|
---|
774 | | $$(dir $$@)
|
---|
775 | $(call MSG_COMPILE,tstAsmStructsasm,$<,$@,AS)
|
---|
776 | ifndef DONT_USE_YASM
|
---|
777 | $(QUIET)$(TOOL_YASM_AS) $(MY_ASA_ASM_STUFF) -DDO_GLOBALS -o $@ $<
|
---|
778 | else
|
---|
779 | $(QUIET)$(TOOL_NASM_AS) $(MY_ASA_ASM_STUFF) -DDO_GLOBALS -o $@ $<
|
---|
780 | endif
|
---|
781 | %$(QUIET2)$(RM) -f -- $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o.dep
|
---|
782 | %$(QUIET2)$(APPEND) '$(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o.dep' 'tstAsmStructsAsmDep_STUFF=$(MY_ASA_ASM_STUFF)'
|
---|
783 |
|
---|
784 | # 2. use nm and sed to transform this into the header we want.
|
---|
785 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsHC.h: $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructsAsm.o
|
---|
786 | $(call MSG_GENERATE,tstVMStructSize,$@,$<)
|
---|
787 | $(QUIET)$(RM) -f $@ [email protected] [email protected]
|
---|
788 | $(QUIET)$(REDIRECT) -wo [email protected] -- $(VBOX_NM) $<
|
---|
789 | $(QUIET)$(SED) \
|
---|
790 | -e '/STAMPROFILEADV/d' \
|
---|
791 | \
|
---|
792 | -e '/^\(0x\)\{0,1\}00[0-9a-fA-F]* [aAnN] [^_.]*\./!d' \
|
---|
793 | -e 's/^\(0x\)\{0,1\}\(00[0-9a-fA-F]*\) [aAnN] \([^.]*\)\.\(.*$$\)/ CHECK_OFF(\3, 0x0\2, \4);/' \
|
---|
794 | --output [email protected] [email protected]
|
---|
795 | $(QUIET)$(SED) \
|
---|
796 | -e '/VM_size$$/d' \
|
---|
797 | -e '/VMCPU_size$$/d' \
|
---|
798 | -e '/VMMCPU_size$$/d' \
|
---|
799 | -e '/SUPDRVTRACERUSRCTX32_size$$/d' \
|
---|
800 | -e '/HMCPU_size$$/d' \
|
---|
801 | \
|
---|
802 | -e '/^\(0x\)\{0,1\}00[0-9a-fA-F]* [aAnN] [^_.]*_size$$/!d' \
|
---|
803 | -e 's/^\(0x\)\{0,1\}\(00[0-9a-fA-F]*\) [aAnN] \([^_.]*\)_size/ CHECK_SIZE(\3, 0x0\2);/' \
|
---|
804 | --append [email protected] [email protected]
|
---|
805 | $(QUIET)$(MV) -f [email protected] $@
|
---|
806 | $(QUIET)$(RM) -f [email protected]
|
---|
807 |
|
---|
808 | # 3. run it.
|
---|
809 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run: \
|
---|
810 | $$(tstAsmStructs_1_STAGE_TARGET) \
|
---|
811 | $(if-expr defined(VBOX_WITH_RAW_MODE),$$(tstAsmStructsRC_1_STAGE_TARGET),)
|
---|
812 | $(QUIET)$(RM) -f $@
|
---|
813 | $(tstAsmStructs_1_STAGE_TARGET)
|
---|
814 | ifdef VBOX_WITH_RAW_MODE
|
---|
815 | $(tstAsmStructsRC_1_STAGE_TARGET)
|
---|
816 | endif
|
---|
817 | $(QUIET)$(APPEND) "$@" "done"
|
---|
818 |
|
---|
819 |
|
---|
820 |
|
---|
821 | #
|
---|
822 | # Run rule for tstVMStructSize.
|
---|
823 | #
|
---|
824 |
|
---|
825 | ifdef VBOX_WITH_RAW_MODE
|
---|
826 | # 1. Manually dump selected structures and members.
|
---|
827 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructRC.h: $$(tstVMStructRC_1_STAGE_TARGET) | $$(dir $$@)
|
---|
828 | $(call MSG_GENERATE,tstVMStructSize,$@)
|
---|
829 | $(QUIET)$(REDIRECT) -wo $@ -- $<
|
---|
830 | endif # VBOX_WITH_RAW_MODE
|
---|
831 |
|
---|
832 | # 2. run it.
|
---|
833 | $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run: $$(tstVMStructSize_1_STAGE_TARGET) | $$(dir $$@)
|
---|
834 | $(QUIET)$(RM) -f $@
|
---|
835 | $<
|
---|
836 | $(QUIET)$(APPEND) "$@" "done"
|
---|
837 |
|
---|
838 | # alias for the two struct tests.
|
---|
839 | run-struct-tests: $(VBOX_VMM_TESTCASE_OUT_DIR)/tstAsmStructs.run $(VBOX_VMM_TESTCASE_OUT_DIR)/tstVMStructSize.run
|
---|
840 |
|
---|