1 | /* $Id: tstDeviceVMMStubs.cpp 69162 2017-10-23 11:10:23Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * tstDevice - Test framework for PDM devices/drivers, shim library exporting methods
|
---|
4 | * originally for VBoxVMM for intercepting (we don't want to use the PDM module
|
---|
5 | * to use the originals from VBoxVMM).
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2017 Oracle Corporation
|
---|
10 | *
|
---|
11 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
12 | * available from http://www.virtualbox.org. This file is free software;
|
---|
13 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
14 | * General Public License (GPL) as published by the Free Software
|
---|
15 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
16 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
17 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
18 | */
|
---|
19 | /* Methods imported from VBoxVMM by VBoxDD are extracted with:
|
---|
20 | * objdump -T VBoxDD.so | grep "UND" | awk -F ' ' '{print $5}' | grep -E "^TM|^PGM|^PDM|^CFGM|^IOM|^MM|^VM|^PDM|^SUP" | sort
|
---|
21 | */
|
---|
22 |
|
---|
23 | /*********************************************************************************************************************************
|
---|
24 | * Header Files *
|
---|
25 | *********************************************************************************************************************************/
|
---|
26 | #define LOG_GROUP LOG_GROUP_DEFAULT /** @todo */
|
---|
27 | #include <iprt/assert.h>
|
---|
28 | #include <iprt/mem.h>
|
---|
29 |
|
---|
30 | #include <VBox/err.h>
|
---|
31 | #include <VBox/cdefs.h>
|
---|
32 |
|
---|
33 | #include "tstDeviceVMMInternal.h"
|
---|
34 |
|
---|
35 | /*********************************************************************************************************************************
|
---|
36 | * Defined Constants And Macros *
|
---|
37 | *********************************************************************************************************************************/
|
---|
38 |
|
---|
39 |
|
---|
40 | /*********************************************************************************************************************************
|
---|
41 | * Structures and Typedefs *
|
---|
42 | *********************************************************************************************************************************/
|
---|
43 |
|
---|
44 |
|
---|
45 | /*********************************************************************************************************************************
|
---|
46 | * Global Variables *
|
---|
47 | *********************************************************************************************************************************/
|
---|
48 |
|
---|
49 |
|
---|
50 | /*********************************************************************************************************************************
|
---|
51 | * Internal Functions *
|
---|
52 | *********************************************************************************************************************************/
|
---|
53 |
|
---|
54 |
|
---|
55 | /**
|
---|
56 | * @copydoc CFGMR3AreValuesValid
|
---|
57 | */
|
---|
58 | VMMR3DECL(bool) CFGMR3AreValuesValid(PCFGMNODE pNode, const char *pszzValid)
|
---|
59 | {
|
---|
60 | return pNode->pVmmCallbacks->pfnCFGMR3AreValuesValid(pNode, pszzValid);
|
---|
61 | }
|
---|
62 |
|
---|
63 |
|
---|
64 | /**
|
---|
65 | * @copydoc CFGMR3Dump
|
---|
66 | */
|
---|
67 | VMMR3DECL(void) CFGMR3Dump(PCFGMNODE pRoot)
|
---|
68 | {
|
---|
69 | pRoot->pVmmCallbacks->pfnCFGMR3Dump(pRoot);
|
---|
70 | }
|
---|
71 |
|
---|
72 |
|
---|
73 | /**
|
---|
74 | * @copydoc CFGMR3GetChild
|
---|
75 | */
|
---|
76 | VMMR3DECL(PCFGMNODE) CFGMR3GetChild(PCFGMNODE pNode, const char *pszPath)
|
---|
77 | {
|
---|
78 | return pNode->pVmmCallbacks->pfnCFGMR3GetChild(pNode, pszPath);
|
---|
79 | }
|
---|
80 |
|
---|
81 |
|
---|
82 | /**
|
---|
83 | * @copydoc CFGMR3GetChildF
|
---|
84 | */
|
---|
85 | VMMR3DECL(PCFGMNODE) CFGMR3GetChildF(PCFGMNODE pNode, const char *pszPathFormat, ...) RT_IPRT_FORMAT_ATTR(2, 3)
|
---|
86 | {
|
---|
87 | va_list Args;
|
---|
88 | va_start(Args, pszPathFormat);
|
---|
89 | PCFGMNODE pChild = pNode->pVmmCallbacks->pfnCFGMR3GetChildFV(pNode, pszPathFormat, Args);
|
---|
90 | va_end(Args);
|
---|
91 |
|
---|
92 | return pChild;
|
---|
93 | }
|
---|
94 |
|
---|
95 |
|
---|
96 | /**
|
---|
97 | * @copydoc CFGMR3GetFirstChild
|
---|
98 | */
|
---|
99 | VMMR3DECL(PCFGMNODE) CFGMR3GetFirstChild(PCFGMNODE pNode)
|
---|
100 | {
|
---|
101 | return pNode->pVmmCallbacks->pfnCFGMR3GetFirstChild(pNode);
|
---|
102 | }
|
---|
103 |
|
---|
104 |
|
---|
105 | /**
|
---|
106 | * @copydoc CFGMR3GetName
|
---|
107 | */
|
---|
108 | VMMR3DECL(int) CFGMR3GetName(PCFGMNODE pCur, char *pszName, size_t cchName)
|
---|
109 | {
|
---|
110 | return pCur->pVmmCallbacks->pfnCFGMR3GetName(pCur, pszName, cchName);
|
---|
111 | }
|
---|
112 |
|
---|
113 |
|
---|
114 | /**
|
---|
115 | * @copydoc CFGMR3GetFirstChild
|
---|
116 | */
|
---|
117 | VMMR3DECL(PCFGMNODE) CFGMR3GetNextChild(PCFGMNODE pNode)
|
---|
118 | {
|
---|
119 | return pNode->pVmmCallbacks->pfnCFGMR3GetNextChild(pNode);
|
---|
120 | }
|
---|
121 |
|
---|
122 |
|
---|
123 | /**
|
---|
124 | * @copydoc CFGMR3GetParent
|
---|
125 | */
|
---|
126 | VMMR3DECL(PCFGMNODE) CFGMR3GetParent(PCFGMNODE pNode)
|
---|
127 | {
|
---|
128 | return pNode->pVmmCallbacks->pfnCFGMR3GetParent(pNode);
|
---|
129 | }
|
---|
130 |
|
---|
131 |
|
---|
132 | /**
|
---|
133 | * @copydoc CFGMR3GetRoot
|
---|
134 | */
|
---|
135 | VMMR3DECL(PCFGMNODE) CFGMR3GetRoot(PVM pVM)
|
---|
136 | {
|
---|
137 | return pVM->vm.s.pVmmCallbacks->pfnCFGMR3GetRoot(pVM);
|
---|
138 | }
|
---|
139 |
|
---|
140 |
|
---|
141 | /**
|
---|
142 | * @copydoc CFGMR3InsertNode
|
---|
143 | */
|
---|
144 | VMMR3DECL(int) CFGMR3InsertNode(PCFGMNODE pNode, const char *pszName, PCFGMNODE *ppChild)
|
---|
145 | {
|
---|
146 | return pNode->pVmmCallbacks->pfnCFGMR3InsertNode(pNode, pszName, ppChild);
|
---|
147 | }
|
---|
148 |
|
---|
149 |
|
---|
150 | /**
|
---|
151 | * @copydoc CFGMR3InsertNodeF
|
---|
152 | */
|
---|
153 | VMMR3DECL(int) CFGMR3InsertNodeF(PCFGMNODE pNode, PCFGMNODE *ppChild,
|
---|
154 | const char *pszNameFormat, ...) RT_IPRT_FORMAT_ATTR(3, 4)
|
---|
155 | {
|
---|
156 | va_list Args;
|
---|
157 | va_start(Args, pszNameFormat);
|
---|
158 | int rc = pNode->pVmmCallbacks->pfnCFGMR3InsertNodeFV(pNode, ppChild, pszNameFormat, Args);
|
---|
159 | va_end(Args);
|
---|
160 |
|
---|
161 | return rc;
|
---|
162 | }
|
---|
163 |
|
---|
164 |
|
---|
165 | /**
|
---|
166 | * @copydoc CFGMR3InsertString
|
---|
167 | */
|
---|
168 | VMMR3DECL(int) CFGMR3InsertString(PCFGMNODE pNode, const char *pszName, const char *pszString)
|
---|
169 | {
|
---|
170 | return pNode->pVmmCallbacks->pfnCFGMR3InsertString(pNode, pszName, pszString);
|
---|
171 | }
|
---|
172 |
|
---|
173 |
|
---|
174 | /**
|
---|
175 | * @copydoc CFGMR3QueryBool
|
---|
176 | */
|
---|
177 | VMMR3DECL(int) CFGMR3QueryBool(PCFGMNODE pNode, const char *pszName, bool *pf)
|
---|
178 | {
|
---|
179 | uint64_t u64;
|
---|
180 | int rc = CFGMR3QueryInteger(pNode, pszName, &u64);
|
---|
181 | if (RT_SUCCESS(rc))
|
---|
182 | *pf = u64 ? true : false;
|
---|
183 | return rc;
|
---|
184 | }
|
---|
185 |
|
---|
186 |
|
---|
187 | /**
|
---|
188 | * @copydoc CFGMR3QueryBoolDef
|
---|
189 | */
|
---|
190 | VMMR3DECL(int) CFGMR3QueryBoolDef(PCFGMNODE pNode, const char *pszName, bool *pf, bool fDef)
|
---|
191 | {
|
---|
192 | uint64_t u64;
|
---|
193 | int rc = CFGMR3QueryIntegerDef(pNode, pszName, &u64, fDef);
|
---|
194 | *pf = u64 ? true : false;
|
---|
195 | return rc;
|
---|
196 | }
|
---|
197 |
|
---|
198 |
|
---|
199 | /**
|
---|
200 | * @copydoc CFGMR3QueryBytes
|
---|
201 | */
|
---|
202 | VMMR3DECL(int) CFGMR3QueryBytes(PCFGMNODE pNode, const char *pszName, void *pvData, size_t cbData)
|
---|
203 | {
|
---|
204 | return pNode->pVmmCallbacks->pfnCFGMR3QueryBytes(pNode, pszName, pvData, cbData);
|
---|
205 | }
|
---|
206 |
|
---|
207 |
|
---|
208 | /**
|
---|
209 | * @copydoc CFGMR3QueryInteger
|
---|
210 | */
|
---|
211 | VMMR3DECL(int) CFGMR3QueryInteger(PCFGMNODE pNode, const char *pszName, uint64_t *pu64)
|
---|
212 | {
|
---|
213 | return pNode->pVmmCallbacks->pfnCFGMR3QueryInteger(pNode, pszName, pu64);
|
---|
214 | }
|
---|
215 |
|
---|
216 |
|
---|
217 | /**
|
---|
218 | * @copydoc CFGMR3QueryIntegerDef
|
---|
219 | */
|
---|
220 | VMMR3DECL(int) CFGMR3QueryIntegerDef(PCFGMNODE pNode, const char *pszName, uint64_t *pu64, uint64_t u64Def)
|
---|
221 | {
|
---|
222 | int rc = CFGMR3QueryInteger(pNode, pszName, pu64);
|
---|
223 | if (RT_FAILURE(rc))
|
---|
224 | {
|
---|
225 | *pu64 = u64Def;
|
---|
226 | if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
|
---|
227 | rc = VINF_SUCCESS;
|
---|
228 | }
|
---|
229 |
|
---|
230 | return rc;
|
---|
231 | }
|
---|
232 |
|
---|
233 |
|
---|
234 | /**
|
---|
235 | * @copydoc CFGMR3QueryPortDef
|
---|
236 | */
|
---|
237 | VMMR3DECL(int) CFGMR3QueryPortDef(PCFGMNODE pNode, const char *pszName, PRTIOPORT pPort, RTIOPORT PortDef)
|
---|
238 | {
|
---|
239 | AssertCompileSize(RTIOPORT, 2);
|
---|
240 | return CFGMR3QueryU16Def(pNode, pszName, pPort, PortDef);
|
---|
241 | }
|
---|
242 |
|
---|
243 |
|
---|
244 | /**
|
---|
245 | * @copydoc CFGMR3QueryPtr
|
---|
246 | */
|
---|
247 | VMMR3DECL(int) CFGMR3QueryPtr(PCFGMNODE pNode, const char *pszName, void **ppv)
|
---|
248 | {
|
---|
249 | uint64_t u64;
|
---|
250 | int rc = CFGMR3QueryInteger(pNode, pszName, &u64);
|
---|
251 | if (RT_SUCCESS(rc))
|
---|
252 | {
|
---|
253 | uintptr_t u = (uintptr_t)u64;
|
---|
254 | if (u64 == u)
|
---|
255 | *ppv = (void *)u;
|
---|
256 | else
|
---|
257 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
258 | }
|
---|
259 | return rc;
|
---|
260 | }
|
---|
261 |
|
---|
262 |
|
---|
263 | /**
|
---|
264 | * @copydoc CFGMR3QueryS32
|
---|
265 | */
|
---|
266 | VMMR3DECL(int) CFGMR3QueryS32(PCFGMNODE pNode, const char *pszName, int32_t *pi32)
|
---|
267 | {
|
---|
268 | uint64_t u64;
|
---|
269 | int rc = CFGMR3QueryInteger(pNode, pszName, &u64);
|
---|
270 | if (RT_SUCCESS(rc))
|
---|
271 | {
|
---|
272 | if ( !(u64 & UINT64_C(0xffffffff80000000))
|
---|
273 | || (u64 & UINT64_C(0xffffffff80000000)) == UINT64_C(0xffffffff80000000))
|
---|
274 | *pi32 = (int32_t)u64;
|
---|
275 | else
|
---|
276 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
277 | }
|
---|
278 | return rc;
|
---|
279 | }
|
---|
280 |
|
---|
281 |
|
---|
282 | /**
|
---|
283 | * @copydoc CFGMR3QueryS32Def
|
---|
284 | */
|
---|
285 | VMMR3DECL(int) CFGMR3QueryS32Def(PCFGMNODE pNode, const char *pszName, int32_t *pi32, int32_t i32Def)
|
---|
286 | {
|
---|
287 | uint64_t u64;
|
---|
288 | int rc = CFGMR3QueryIntegerDef(pNode, pszName, &u64, i32Def);
|
---|
289 | if (RT_SUCCESS(rc))
|
---|
290 | {
|
---|
291 | if ( !(u64 & UINT64_C(0xffffffff80000000))
|
---|
292 | || (u64 & UINT64_C(0xffffffff80000000)) == UINT64_C(0xffffffff80000000))
|
---|
293 | *pi32 = (int32_t)u64;
|
---|
294 | else
|
---|
295 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
296 | }
|
---|
297 | if (RT_FAILURE(rc))
|
---|
298 | *pi32 = i32Def;
|
---|
299 | return rc;
|
---|
300 | }
|
---|
301 |
|
---|
302 |
|
---|
303 | /**
|
---|
304 | * @copydoc CFGMR3QuerySIntDef
|
---|
305 | */
|
---|
306 | VMMR3DECL(int) CFGMR3QuerySIntDef(PCFGMNODE pNode, const char *pszName, signed int *pi, signed int iDef)
|
---|
307 | {
|
---|
308 | AssertCompileSize(signed int, 4);
|
---|
309 | return CFGMR3QueryS32Def(pNode, pszName, (int32_t *)pi, iDef);
|
---|
310 | }
|
---|
311 |
|
---|
312 |
|
---|
313 | /**
|
---|
314 | * @copydoc CFGMR3QuerySize
|
---|
315 | */
|
---|
316 | VMMDECL(int) CFGMR3QuerySize(PCFGMNODE pNode, const char *pszName, size_t *pcb)
|
---|
317 | {
|
---|
318 | return pNode->pVmmCallbacks->pfnCFGMR3QuerySize(pNode, pszName, pcb);
|
---|
319 | }
|
---|
320 |
|
---|
321 |
|
---|
322 | /**
|
---|
323 | * @copydoc CFGMR3QueryString
|
---|
324 | */
|
---|
325 | VMMR3DECL(int) CFGMR3QueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString)
|
---|
326 | {
|
---|
327 | return pNode->pVmmCallbacks->pfnCFGMR3QueryString(pNode, pszName, pszString, cchString);
|
---|
328 | }
|
---|
329 |
|
---|
330 |
|
---|
331 | /**
|
---|
332 | * @copydoc CFGMR3QueryStringDef
|
---|
333 | */
|
---|
334 | VMMR3DECL(int) CFGMR3QueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)
|
---|
335 | {
|
---|
336 | int rc = CFGMR3QueryString(pNode, pszName, pszString, cchString);
|
---|
337 | if (RT_FAILURE(rc) && rc != VERR_CFGM_NOT_ENOUGH_SPACE)
|
---|
338 | {
|
---|
339 | size_t cchDef = strlen(pszDef);
|
---|
340 | if (cchString > cchDef)
|
---|
341 | {
|
---|
342 | memcpy(pszString, pszDef, cchDef);
|
---|
343 | memset(pszString + cchDef, 0, cchString - cchDef);
|
---|
344 | if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
|
---|
345 | rc = VINF_SUCCESS;
|
---|
346 | }
|
---|
347 | else if (rc == VERR_CFGM_VALUE_NOT_FOUND || rc == VERR_CFGM_NO_PARENT)
|
---|
348 | rc = VERR_CFGM_NOT_ENOUGH_SPACE;
|
---|
349 | }
|
---|
350 |
|
---|
351 | return rc;
|
---|
352 | }
|
---|
353 |
|
---|
354 |
|
---|
355 | /**
|
---|
356 | * @copydoc CFGMR3QueryStringAlloc
|
---|
357 | */
|
---|
358 | VMMR3DECL(int) CFGMR3QueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString)
|
---|
359 | {
|
---|
360 | #if 0
|
---|
361 | size_t cbString;
|
---|
362 | int rc = CFGMR3QuerySize(pNode, pszName, &cbString);
|
---|
363 | if (RT_SUCCESS(rc))
|
---|
364 | {
|
---|
365 | char *pszString = cfgmR3StrAlloc(pNode->pVM, MM_TAG_CFGM_USER, cbString);
|
---|
366 | if (pszString)
|
---|
367 | {
|
---|
368 | rc = CFGMR3QueryString(pNode, pszName, pszString, cbString);
|
---|
369 | if (RT_SUCCESS(rc))
|
---|
370 | *ppszString = pszString;
|
---|
371 | else
|
---|
372 | cfgmR3StrFree(pNode->pVM, pszString);
|
---|
373 | }
|
---|
374 | else
|
---|
375 | rc = VERR_NO_MEMORY;
|
---|
376 | }
|
---|
377 | return rc;
|
---|
378 | #endif
|
---|
379 | RT_NOREF(pNode, pszName, ppszString);
|
---|
380 | AssertFailed();
|
---|
381 | return VERR_NOT_IMPLEMENTED;
|
---|
382 | }
|
---|
383 |
|
---|
384 |
|
---|
385 | /**
|
---|
386 | * @copydoc CFGMR3QueryStringAllocDef
|
---|
387 | */
|
---|
388 | VMMR3DECL(int) CFGMR3QueryStringAllocDef(PCFGMNODE pNode, const char *pszName, char **ppszString, const char *pszDef)
|
---|
389 | {
|
---|
390 | RT_NOREF(pNode, pszName, ppszString, pszDef);
|
---|
391 | AssertFailed();
|
---|
392 | return VERR_NOT_IMPLEMENTED;
|
---|
393 | }
|
---|
394 |
|
---|
395 |
|
---|
396 | /**
|
---|
397 | * @copydoc CFGMR3QueryU16
|
---|
398 | */
|
---|
399 | VMMR3DECL(int) CFGMR3QueryU16(PCFGMNODE pNode, const char *pszName, uint16_t *pu16)
|
---|
400 | {
|
---|
401 | uint64_t u64;
|
---|
402 | int rc = CFGMR3QueryInteger(pNode, pszName, &u64);
|
---|
403 | if (RT_SUCCESS(rc))
|
---|
404 | {
|
---|
405 | if (!(u64 & UINT64_C(0xffffffffffff0000)))
|
---|
406 | *pu16 = (int16_t)u64;
|
---|
407 | else
|
---|
408 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
409 | }
|
---|
410 | return rc;
|
---|
411 | }
|
---|
412 |
|
---|
413 |
|
---|
414 | /**
|
---|
415 | * @copydoc CFGMR3QueryU16Def
|
---|
416 | */
|
---|
417 | VMMR3DECL(int) CFGMR3QueryU16Def(PCFGMNODE pNode, const char *pszName, uint16_t *pu16, uint16_t u16Def)
|
---|
418 | {
|
---|
419 | uint64_t u64;
|
---|
420 | int rc = CFGMR3QueryIntegerDef(pNode, pszName, &u64, u16Def);
|
---|
421 | if (RT_SUCCESS(rc))
|
---|
422 | {
|
---|
423 | if (!(u64 & UINT64_C(0xffffffffffff0000)))
|
---|
424 | *pu16 = (int16_t)u64;
|
---|
425 | else
|
---|
426 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
427 | }
|
---|
428 | if (RT_FAILURE(rc))
|
---|
429 | *pu16 = u16Def;
|
---|
430 | return rc;
|
---|
431 | }
|
---|
432 |
|
---|
433 |
|
---|
434 | /**
|
---|
435 | * @copydoc CFGMR3QueryU32
|
---|
436 | */
|
---|
437 | VMMR3DECL(int) CFGMR3QueryU32(PCFGMNODE pNode, const char *pszName, uint32_t *pu32)
|
---|
438 | {
|
---|
439 | uint64_t u64;
|
---|
440 | int rc = CFGMR3QueryInteger(pNode, pszName, &u64);
|
---|
441 | if (RT_SUCCESS(rc))
|
---|
442 | {
|
---|
443 | if (!(u64 & UINT64_C(0xffffffff00000000)))
|
---|
444 | *pu32 = (uint32_t)u64;
|
---|
445 | else
|
---|
446 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
447 | }
|
---|
448 | return rc;
|
---|
449 | }
|
---|
450 |
|
---|
451 |
|
---|
452 | /**
|
---|
453 | * @copydoc CFGMR3QueryU32Def
|
---|
454 | */
|
---|
455 | VMMR3DECL(int) CFGMR3QueryU32Def(PCFGMNODE pNode, const char *pszName, uint32_t *pu32, uint32_t u32Def)
|
---|
456 | {
|
---|
457 | uint64_t u64;
|
---|
458 | int rc = CFGMR3QueryIntegerDef(pNode, pszName, &u64, u32Def);
|
---|
459 | if (RT_SUCCESS(rc))
|
---|
460 | {
|
---|
461 | if (!(u64 & UINT64_C(0xffffffff00000000)))
|
---|
462 | *pu32 = (uint32_t)u64;
|
---|
463 | else
|
---|
464 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
465 | }
|
---|
466 | if (RT_FAILURE(rc))
|
---|
467 | *pu32 = u32Def;
|
---|
468 | return rc;
|
---|
469 | }
|
---|
470 |
|
---|
471 |
|
---|
472 | /**
|
---|
473 | * @copydoc CFGMR3QueryU64
|
---|
474 | */
|
---|
475 | VMMR3DECL(int) CFGMR3QueryU64(PCFGMNODE pNode, const char *pszName, uint64_t *pu64)
|
---|
476 | {
|
---|
477 | return CFGMR3QueryInteger(pNode, pszName, pu64);
|
---|
478 | }
|
---|
479 |
|
---|
480 |
|
---|
481 | /**
|
---|
482 | * @copydoc CFGMR3QueryU64Def
|
---|
483 | */
|
---|
484 | VMMR3DECL(int) CFGMR3QueryU64Def(PCFGMNODE pNode, const char *pszName, uint64_t *pu64, uint64_t u64Def)
|
---|
485 | {
|
---|
486 | return CFGMR3QueryIntegerDef(pNode, pszName, pu64, u64Def);
|
---|
487 | }
|
---|
488 |
|
---|
489 |
|
---|
490 | /**
|
---|
491 | * @copydoc CFGMR3QueryU8
|
---|
492 | */
|
---|
493 | VMMR3DECL(int) CFGMR3QueryU8(PCFGMNODE pNode, const char *pszName, uint8_t *pu8)
|
---|
494 | {
|
---|
495 | uint64_t u64;
|
---|
496 | int rc = CFGMR3QueryInteger(pNode, pszName, &u64);
|
---|
497 | if (RT_SUCCESS(rc))
|
---|
498 | {
|
---|
499 | if (!(u64 & UINT64_C(0xffffffffffffff00)))
|
---|
500 | *pu8 = (uint8_t)u64;
|
---|
501 | else
|
---|
502 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
503 | }
|
---|
504 | return rc;
|
---|
505 | }
|
---|
506 |
|
---|
507 |
|
---|
508 | /**
|
---|
509 | * @copydoc CFGMR3QueryU8Def
|
---|
510 | */
|
---|
511 | VMMR3DECL(int) CFGMR3QueryU8Def(PCFGMNODE pNode, const char *pszName, uint8_t *pu8, uint8_t u8Def)
|
---|
512 | {
|
---|
513 | uint64_t u64;
|
---|
514 | int rc = CFGMR3QueryIntegerDef(pNode, pszName, &u64, u8Def);
|
---|
515 | if (RT_SUCCESS(rc))
|
---|
516 | {
|
---|
517 | if (!(u64 & UINT64_C(0xffffffffffffff00)))
|
---|
518 | *pu8 = (uint8_t)u64;
|
---|
519 | else
|
---|
520 | rc = VERR_CFGM_INTEGER_TOO_BIG;
|
---|
521 | }
|
---|
522 | if (RT_FAILURE(rc))
|
---|
523 | *pu8 = u8Def;
|
---|
524 | return rc;
|
---|
525 | }
|
---|
526 |
|
---|
527 |
|
---|
528 | /**
|
---|
529 | * @copydoc CFGMR3RemoveNode
|
---|
530 | */
|
---|
531 | VMMR3DECL(void) CFGMR3RemoveNode(PCFGMNODE pNode)
|
---|
532 | {
|
---|
533 | pNode->pVmmCallbacks->pfnCFGMR3RemoveNode(pNode);
|
---|
534 | }
|
---|
535 |
|
---|
536 |
|
---|
537 | /**
|
---|
538 | * @copydoc CFGMR3ValidateConfig
|
---|
539 | */
|
---|
540 | VMMR3DECL(int) CFGMR3ValidateConfig(PCFGMNODE pNode, const char *pszNode,
|
---|
541 | const char *pszValidValues, const char *pszValidNodes,
|
---|
542 | const char *pszWho, uint32_t uInstance)
|
---|
543 | {
|
---|
544 | return pNode->pVmmCallbacks->pfnCFGMR3ValidateConfig(pNode, pszNode, pszValidValues, pszValidNodes, pszWho, uInstance);
|
---|
545 | }
|
---|
546 |
|
---|
547 |
|
---|
548 | /**
|
---|
549 | * @copydoc IOMIOPortWrite
|
---|
550 | */
|
---|
551 | VMMDECL(VBOXSTRICTRC) IOMIOPortWrite(PVM pVM, PVMCPU pVCpu, RTIOPORT Port, uint32_t u32Value, size_t cbValue)
|
---|
552 | {
|
---|
553 | return pVM->vm.s.pVmmCallbacks->pfnIOMIOPortWrite(pVM, pVCpu, Port, u32Value, cbValue);
|
---|
554 | }
|
---|
555 |
|
---|
556 |
|
---|
557 | /**
|
---|
558 | * @copydoc IOMMMIOMapMMIO2Page
|
---|
559 | */
|
---|
560 | VMMDECL(int) IOMMMIOMapMMIO2Page(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysRemapped, uint64_t fPageFlags)
|
---|
561 | {
|
---|
562 | return pVM->vm.s.pVmmCallbacks->pfnIOMMMIOMapMMIO2Page(pVM, GCPhys, GCPhysRemapped, fPageFlags);
|
---|
563 | }
|
---|
564 |
|
---|
565 |
|
---|
566 | /**
|
---|
567 | * @copydoc IOMMMIOResetRegion
|
---|
568 | */
|
---|
569 | VMMDECL(int) IOMMMIOResetRegion(PVM pVM, RTGCPHYS GCPhys)
|
---|
570 | {
|
---|
571 | return pVM->vm.s.pVmmCallbacks->pfnIOMMMIOResetRegion(pVM, GCPhys);
|
---|
572 | }
|
---|
573 |
|
---|
574 |
|
---|
575 | /**
|
---|
576 | * @copydoc MMHyperAlloc
|
---|
577 | */
|
---|
578 | VMMDECL(int) MMHyperAlloc(PVM pVM, size_t cb, uint32_t uAlignment, MMTAG enmTag, void **ppv)
|
---|
579 | {
|
---|
580 | return pVM->vm.s.pVmmCallbacks->pfnMMHyperAlloc(pVM, cb, uAlignment, enmTag, ppv);
|
---|
581 | }
|
---|
582 |
|
---|
583 |
|
---|
584 | /**
|
---|
585 | * @copydoc MMHyperFree
|
---|
586 | */
|
---|
587 | VMMDECL(int) MMHyperFree(PVM pVM, void *pv)
|
---|
588 | {
|
---|
589 | return pVM->vm.s.pVmmCallbacks->pfnMMHyperFree(pVM, pv);
|
---|
590 | }
|
---|
591 |
|
---|
592 |
|
---|
593 | /**
|
---|
594 | * @copydoc MMHyperR3ToR0
|
---|
595 | */
|
---|
596 | VMMDECL(RTR0PTR) MMHyperR3ToR0(PVM pVM, RTR3PTR R3Ptr)
|
---|
597 | {
|
---|
598 | return pVM->vm.s.pVmmCallbacks->pfnMMHyperR3ToR0(pVM, R3Ptr);
|
---|
599 | }
|
---|
600 |
|
---|
601 |
|
---|
602 | /**
|
---|
603 | * @copydoc MMHyperR3ToRC
|
---|
604 | */
|
---|
605 | VMMDECL(RTRCPTR) MMHyperR3ToRC(PVM pVM, RTR3PTR R3Ptr)
|
---|
606 | {
|
---|
607 | return pVM->vm.s.pVmmCallbacks->pfnMMHyperR3ToRC(pVM, R3Ptr);
|
---|
608 | }
|
---|
609 |
|
---|
610 |
|
---|
611 | /**
|
---|
612 | * @copydoc MMR3HeapFree
|
---|
613 | */
|
---|
614 | VMMR3DECL(void) MMR3HeapFree(void *pv)
|
---|
615 | {
|
---|
616 | RTMemFree(pv); /** @todo */
|
---|
617 | }
|
---|
618 |
|
---|
619 |
|
---|
620 | /**
|
---|
621 | * @copydoc MMR3HyperAllocOnceNoRel
|
---|
622 | */
|
---|
623 | VMMR3DECL(int) MMR3HyperAllocOnceNoRel(PVM pVM, size_t cb, uint32_t uAlignment, MMTAG enmTag, void **ppv)
|
---|
624 | {
|
---|
625 | return pVM->vm.s.pVmmCallbacks->pfnMMR3HyperAllocOnceNoRel(pVM, cb, uAlignment, enmTag, ppv);
|
---|
626 | }
|
---|
627 |
|
---|
628 |
|
---|
629 | /**
|
---|
630 | * @copydoc MMR3PhysGetRamSize
|
---|
631 | */
|
---|
632 | VMMR3DECL(uint64_t) MMR3PhysGetRamSize(PVM pVM)
|
---|
633 | {
|
---|
634 | return pVM->vm.s.pVmmCallbacks->pfnMMR3PhysGetRamSize(pVM);
|
---|
635 | }
|
---|
636 |
|
---|
637 |
|
---|
638 | /**
|
---|
639 | * @copydoc MMR3PhysGetRamSizeBelow4GB
|
---|
640 | */
|
---|
641 | VMMR3DECL(uint32_t) MMR3PhysGetRamSizeBelow4GB(PVM pVM)
|
---|
642 | {
|
---|
643 | return pVM->vm.s.pVmmCallbacks->pfnMMR3PhysGetRamSizeBelow4GB(pVM);
|
---|
644 | }
|
---|
645 |
|
---|
646 |
|
---|
647 | /**
|
---|
648 | * @copydoc MMR3PhysGetRamSizeAbove4GB
|
---|
649 | */
|
---|
650 | VMMR3DECL(uint64_t) MMR3PhysGetRamSizeAbove4GB(PVM pVM)
|
---|
651 | {
|
---|
652 | return pVM->vm.s.pVmmCallbacks->pfnMMR3PhysGetRamSizeAbove4GB(pVM);
|
---|
653 | }
|
---|
654 |
|
---|
655 |
|
---|
656 | /**
|
---|
657 | * @copydoc PDMCritSectEnterDebug
|
---|
658 | */
|
---|
659 | VMMDECL(int) PDMCritSectEnterDebug(PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
660 | {
|
---|
661 | return pCritSect->s.pVmmCallbacks->pfnPDMCritSectEnterDebug(pCritSect, rcBusy, uId, RT_SRC_POS_ARGS);
|
---|
662 | }
|
---|
663 |
|
---|
664 |
|
---|
665 | /**
|
---|
666 | * @copydoc PDMCritSectIsInitialized
|
---|
667 | */
|
---|
668 | VMMDECL(bool) PDMCritSectIsInitialized(PCPDMCRITSECT pCritSect)
|
---|
669 | {
|
---|
670 | return pCritSect->s.pVmmCallbacks->pfnPDMCritSectIsInitialized(pCritSect);
|
---|
671 | }
|
---|
672 |
|
---|
673 |
|
---|
674 | /**
|
---|
675 | * @copydoc PDMCritSectIsOwner
|
---|
676 | */
|
---|
677 | VMMDECL(bool) PDMCritSectIsOwner(PCPDMCRITSECT pCritSect)
|
---|
678 | {
|
---|
679 | return pCritSect->s.pVmmCallbacks->pfnPDMCritSectIsOwner(pCritSect);
|
---|
680 | }
|
---|
681 |
|
---|
682 |
|
---|
683 | /**
|
---|
684 | * @copydoc PDMCritSectLeave
|
---|
685 | */
|
---|
686 | VMMDECL(int) PDMCritSectLeave(PPDMCRITSECT pCritSect)
|
---|
687 | {
|
---|
688 | return pCritSect->s.pVmmCallbacks->pfnPDMCritSectLeave(pCritSect);
|
---|
689 | }
|
---|
690 |
|
---|
691 |
|
---|
692 | /**
|
---|
693 | * @copydoc PDMCritSectTryEnterDebug
|
---|
694 | */
|
---|
695 | VMMDECL(int) PDMCritSectTryEnterDebug(PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
696 | {
|
---|
697 | return pCritSect->s.pVmmCallbacks->pfnPDMCritSectTryEnterDebug(pCritSect, uId, RT_SRC_POS_ARGS);
|
---|
698 | }
|
---|
699 |
|
---|
700 |
|
---|
701 | /**
|
---|
702 | * @copydoc PDMHCCritSectScheduleExitEvent
|
---|
703 | */
|
---|
704 | VMMDECL(int) PDMHCCritSectScheduleExitEvent(PPDMCRITSECT pCritSect, SUPSEMEVENT hEventToSignal)
|
---|
705 | {
|
---|
706 | return pCritSect->s.pVmmCallbacks->pfnPDMHCCritSectScheduleExitEvent(pCritSect, hEventToSignal);
|
---|
707 | }
|
---|
708 |
|
---|
709 |
|
---|
710 | /**
|
---|
711 | * @copydoc PDMNsAllocateBandwidth
|
---|
712 | */
|
---|
713 | VMMDECL(bool) PDMNsAllocateBandwidth(PPDMNSFILTER pFilter, size_t cbTransfer)
|
---|
714 | {
|
---|
715 | #if 0
|
---|
716 | return pFilter->pVmmCallbacks->pfnPDMNsAllocateBandwidth(pFilter, cbTransfer);
|
---|
717 | #endif
|
---|
718 | RT_NOREF(pFilter, cbTransfer);
|
---|
719 | AssertFailed();
|
---|
720 | return false;
|
---|
721 | }
|
---|
722 |
|
---|
723 |
|
---|
724 | /**
|
---|
725 | * @copydoc PDMQueueAlloc
|
---|
726 | */
|
---|
727 | VMMDECL(PPDMQUEUEITEMCORE) PDMQueueAlloc(PPDMQUEUE pQueue)
|
---|
728 | {
|
---|
729 | return pQueue->pVmmCallbacks->pfnPDMQueueAlloc(pQueue);
|
---|
730 | }
|
---|
731 |
|
---|
732 |
|
---|
733 | /**
|
---|
734 | * @copydoc PDMQueueFlushIfNecessary
|
---|
735 | */
|
---|
736 | VMMDECL(bool) PDMQueueFlushIfNecessary(PPDMQUEUE pQueue)
|
---|
737 | {
|
---|
738 | return pQueue->pVmmCallbacks->pfnPDMQueueFlushIfNecessary(pQueue);
|
---|
739 | }
|
---|
740 |
|
---|
741 |
|
---|
742 | /**
|
---|
743 | * @copydoc PDMQueueInsert
|
---|
744 | */
|
---|
745 | VMMDECL(void) PDMQueueInsert(PPDMQUEUE pQueue, PPDMQUEUEITEMCORE pItem)
|
---|
746 | {
|
---|
747 | pQueue->pVmmCallbacks->pfnPDMQueueInsert(pQueue, pItem);
|
---|
748 | }
|
---|
749 |
|
---|
750 |
|
---|
751 | /**
|
---|
752 | * @copydoc PDMQueueR0Ptr
|
---|
753 | */
|
---|
754 | VMMDECL(R0PTRTYPE(PPDMQUEUE)) PDMQueueR0Ptr(PPDMQUEUE pQueue)
|
---|
755 | {
|
---|
756 | return pQueue->pVmmCallbacks->pfnPDMQueueR0Ptr(pQueue);
|
---|
757 | }
|
---|
758 |
|
---|
759 |
|
---|
760 | /**
|
---|
761 | * @copydoc PDMQueueRCPtr
|
---|
762 | */
|
---|
763 | VMMDECL(RCPTRTYPE(PPDMQUEUE)) PDMQueueRCPtr(PPDMQUEUE pQueue)
|
---|
764 | {
|
---|
765 | return pQueue->pVmmCallbacks->pfnPDMQueueRCPtr(pQueue);
|
---|
766 | }
|
---|
767 |
|
---|
768 |
|
---|
769 | /**
|
---|
770 | * @copydoc PGMHandlerPhysicalPageTempOff
|
---|
771 | */
|
---|
772 | VMMDECL(int) PGMHandlerPhysicalPageTempOff(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysPage)
|
---|
773 | {
|
---|
774 | RT_NOREF(pVM, GCPhys, GCPhysPage);
|
---|
775 | AssertFailed();
|
---|
776 | return VERR_NOT_IMPLEMENTED;
|
---|
777 | }
|
---|
778 |
|
---|
779 |
|
---|
780 | /**
|
---|
781 | * @copydoc PGMShwMakePageWritable
|
---|
782 | */
|
---|
783 | VMMDECL(int) PGMShwMakePageWritable(PVMCPU pVCpu, RTGCPTR GCPtr, uint32_t fFlags)
|
---|
784 | {
|
---|
785 | RT_NOREF(pVCpu, GCPtr, fFlags);
|
---|
786 | AssertFailed();
|
---|
787 | return VERR_NOT_IMPLEMENTED;
|
---|
788 | }
|
---|
789 |
|
---|
790 | /** @todo: PDMR3AsyncCompletion + BlkCache + CritSect + QueryLun + Thread. */
|
---|
791 |
|
---|
792 | /**
|
---|
793 | * @copydoc TMCpuTicksPerSecond
|
---|
794 | */
|
---|
795 | VMMDECL(uint64_t) TMCpuTicksPerSecond(PVM pVM)
|
---|
796 | {
|
---|
797 | return pVM->vm.s.pVmmCallbacks->pfnTMCpuTicksPerSecond(pVM);
|
---|
798 | }
|
---|
799 |
|
---|
800 |
|
---|
801 | /**
|
---|
802 | * @copydoc TMR3TimerDestroy
|
---|
803 | */
|
---|
804 | VMMR3DECL(int) TMR3TimerDestroy(PTMTIMER pTimer)
|
---|
805 | {
|
---|
806 | return pTimer->pVmmCallbacks->pfnTMR3TimerDestroy(pTimer);
|
---|
807 | }
|
---|
808 |
|
---|
809 |
|
---|
810 | /**
|
---|
811 | * @copydoc TMR3TimerSave
|
---|
812 | */
|
---|
813 | VMMR3DECL(int) TMR3TimerSave(PTMTIMERR3 pTimer, PSSMHANDLE pSSM)
|
---|
814 | {
|
---|
815 | return pTimer->pVmmCallbacks->pfnTMR3TimerSave(pTimer, pSSM);
|
---|
816 | }
|
---|
817 |
|
---|
818 |
|
---|
819 | /**
|
---|
820 | * @copydoc TMR3TimerLoad
|
---|
821 | */
|
---|
822 | VMMR3DECL(int) TMR3TimerLoad(PTMTIMERR3 pTimer, PSSMHANDLE pSSM)
|
---|
823 | {
|
---|
824 | return pTimer->pVmmCallbacks->pfnTMR3TimerLoad(pTimer, pSSM);
|
---|
825 | }
|
---|
826 |
|
---|
827 |
|
---|
828 | /**
|
---|
829 | * @copydoc TMR3TimerSetCritSect
|
---|
830 | */
|
---|
831 | VMMR3DECL(int) TMR3TimerSetCritSect(PTMTIMERR3 pTimer, PPDMCRITSECT pCritSect)
|
---|
832 | {
|
---|
833 | return pTimer->pVmmCallbacks->pfnTMR3TimerSetCritSect(pTimer, pCritSect);
|
---|
834 | }
|
---|
835 |
|
---|
836 |
|
---|
837 | /**
|
---|
838 | * @copydoc TMTimerFromMilli
|
---|
839 | */
|
---|
840 | VMMDECL(uint64_t) TMTimerFromMilli(PTMTIMER pTimer, uint64_t cMilliSecs)
|
---|
841 | {
|
---|
842 | return pTimer->pVmmCallbacks->pfnTMTimerFromMilli(pTimer, cMilliSecs);
|
---|
843 | }
|
---|
844 |
|
---|
845 |
|
---|
846 | /**
|
---|
847 | * @copydoc TMTimerFromNano
|
---|
848 | */
|
---|
849 | VMMDECL(uint64_t) TMTimerFromNano(PTMTIMER pTimer, uint64_t cNanoSecs)
|
---|
850 | {
|
---|
851 | return pTimer->pVmmCallbacks->pfnTMTimerFromNano(pTimer, cNanoSecs);
|
---|
852 | }
|
---|
853 |
|
---|
854 |
|
---|
855 | /**
|
---|
856 | * @copydoc TMTimerGet
|
---|
857 | */
|
---|
858 | VMMDECL(uint64_t) TMTimerGet(PTMTIMER pTimer)
|
---|
859 | {
|
---|
860 | return pTimer->pVmmCallbacks->pfnTMTimerGet(pTimer);
|
---|
861 | }
|
---|
862 |
|
---|
863 |
|
---|
864 | /**
|
---|
865 | * @copydoc TMTimerGetFreq
|
---|
866 | */
|
---|
867 | VMMDECL(uint64_t) TMTimerGetFreq(PTMTIMER pTimer)
|
---|
868 | {
|
---|
869 | return pTimer->pVmmCallbacks->pfnTMTimerGetFreq(pTimer);
|
---|
870 | }
|
---|
871 |
|
---|
872 |
|
---|
873 | /**
|
---|
874 | * @copydoc TMTimerGetNano
|
---|
875 | */
|
---|
876 | VMMDECL(uint64_t) TMTimerGetNano(PTMTIMER pTimer)
|
---|
877 | {
|
---|
878 | return pTimer->pVmmCallbacks->pfnTMTimerGetNano(pTimer);
|
---|
879 | }
|
---|
880 |
|
---|
881 |
|
---|
882 | /**
|
---|
883 | * @copydoc TMTimerIsActive
|
---|
884 | */
|
---|
885 | VMMDECL(bool) TMTimerIsActive(PTMTIMER pTimer)
|
---|
886 | {
|
---|
887 | return pTimer->pVmmCallbacks->pfnTMTimerIsActive(pTimer);
|
---|
888 | }
|
---|
889 |
|
---|
890 |
|
---|
891 | /**
|
---|
892 | * @copydoc TMTimerIsLockOwner
|
---|
893 | */
|
---|
894 | VMMDECL(bool) TMTimerIsLockOwner(PTMTIMER pTimer)
|
---|
895 | {
|
---|
896 | return pTimer->pVmmCallbacks->pfnTMTimerIsLockOwner(pTimer);
|
---|
897 | }
|
---|
898 |
|
---|
899 |
|
---|
900 | /**
|
---|
901 | * @copydoc TMTimerLock
|
---|
902 | */
|
---|
903 | VMMDECL(int) TMTimerLock(PTMTIMER pTimer, int rcBusy)
|
---|
904 | {
|
---|
905 | return pTimer->pVmmCallbacks->pfnTMTimerLock(pTimer, rcBusy);
|
---|
906 | }
|
---|
907 |
|
---|
908 |
|
---|
909 | /**
|
---|
910 | * @copydoc TMTimerR0Ptr
|
---|
911 | */
|
---|
912 | VMMDECL(PTMTIMERR0) TMTimerR0Ptr(PTMTIMER pTimer)
|
---|
913 | {
|
---|
914 | return pTimer->pVmmCallbacks->pfnTMTimerR0Ptr(pTimer);
|
---|
915 | }
|
---|
916 |
|
---|
917 |
|
---|
918 | /**
|
---|
919 | * @copydoc TMTimerRCPtr
|
---|
920 | */
|
---|
921 | VMMDECL(PTMTIMERRC) TMTimerRCPtr(PTMTIMER pTimer)
|
---|
922 | {
|
---|
923 | return pTimer->pVmmCallbacks->pfnTMTimerRCPtr(pTimer);
|
---|
924 | }
|
---|
925 |
|
---|
926 |
|
---|
927 | /**
|
---|
928 | * @copydoc TMTimerSet
|
---|
929 | */
|
---|
930 | VMMDECL(int) TMTimerSet(PTMTIMER pTimer, uint64_t u64Expire)
|
---|
931 | {
|
---|
932 | return pTimer->pVmmCallbacks->pfnTMTimerSet(pTimer, u64Expire);
|
---|
933 | }
|
---|
934 |
|
---|
935 |
|
---|
936 | /**
|
---|
937 | * @copydoc TMTimerSetFrequencyHint
|
---|
938 | */
|
---|
939 | VMMDECL(int) TMTimerSetFrequencyHint(PTMTIMER pTimer, uint32_t uHz)
|
---|
940 | {
|
---|
941 | return pTimer->pVmmCallbacks->pfnTMTimerSetFrequencyHint(pTimer, uHz);
|
---|
942 | }
|
---|
943 |
|
---|
944 |
|
---|
945 | /**
|
---|
946 | * @copydoc TMTimerSetMicro
|
---|
947 | */
|
---|
948 | VMMDECL(int) TMTimerSetMicro(PTMTIMER pTimer, uint64_t cMicrosToNext)
|
---|
949 | {
|
---|
950 | return pTimer->pVmmCallbacks->pfnTMTimerSetMicro(pTimer, cMicrosToNext);
|
---|
951 | }
|
---|
952 |
|
---|
953 |
|
---|
954 | /**
|
---|
955 | * @copydoc TMTimerSetMillies
|
---|
956 | */
|
---|
957 | VMMDECL(int) TMTimerSetMillies(PTMTIMER pTimer, uint32_t cMilliesToNext)
|
---|
958 | {
|
---|
959 | return pTimer->pVmmCallbacks->pfnTMTimerSetMillies(pTimer, cMilliesToNext);
|
---|
960 | }
|
---|
961 |
|
---|
962 |
|
---|
963 | /**
|
---|
964 | * @copydoc TMTimerSetNano
|
---|
965 | */
|
---|
966 | VMMDECL(int) TMTimerSetNano(PTMTIMER pTimer, uint64_t cNanosToNext)
|
---|
967 | {
|
---|
968 | return pTimer->pVmmCallbacks->pfnTMTimerSetNano(pTimer, cNanosToNext);
|
---|
969 | }
|
---|
970 |
|
---|
971 |
|
---|
972 | /**
|
---|
973 | * @copydoc TMTimerStop
|
---|
974 | */
|
---|
975 | VMMDECL(int) TMTimerStop(PTMTIMER pTimer)
|
---|
976 | {
|
---|
977 | return pTimer->pVmmCallbacks->pfnTMTimerStop(pTimer);
|
---|
978 | }
|
---|
979 |
|
---|
980 |
|
---|
981 | /**
|
---|
982 | * @copydoc TMTimerUnlock
|
---|
983 | */
|
---|
984 | VMMDECL(void) TMTimerUnlock(PTMTIMER pTimer)
|
---|
985 | {
|
---|
986 | return pTimer->pVmmCallbacks->pfnTMTimerUnlock(pTimer);
|
---|
987 | }
|
---|
988 |
|
---|
989 |
|
---|
990 |
|
---|