1 | /* $Id: tstDeviceVMM.cpp 69183 2017-10-23 18:47:18Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * tstDevice - Test framework for PDM devices/drivers, VMM callbacks implementation.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2017 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 |
|
---|
18 |
|
---|
19 | /*********************************************************************************************************************************
|
---|
20 | * Header Files *
|
---|
21 | *********************************************************************************************************************************/
|
---|
22 | #define LOG_GROUP LOG_GROUP_DEFAULT /** @todo */
|
---|
23 | #include <VBox/types.h>
|
---|
24 | #include <VBox/version.h>
|
---|
25 | #include <VBox/vmm/pdmpci.h>
|
---|
26 |
|
---|
27 | #include <iprt/mem.h>
|
---|
28 |
|
---|
29 | #include "tstDeviceInternal.h"
|
---|
30 |
|
---|
31 | /*********************************************************************************************************************************
|
---|
32 | * Defined Constants And Macros *
|
---|
33 | *********************************************************************************************************************************/
|
---|
34 |
|
---|
35 | /** Frequency of the real clock. */
|
---|
36 | #define TMCLOCK_FREQ_REAL UINT32_C(1000)
|
---|
37 | /** Frequency of the virtual clock. */
|
---|
38 | #define TMCLOCK_FREQ_VIRTUAL UINT32_C(1000000000)
|
---|
39 |
|
---|
40 | /*********************************************************************************************************************************
|
---|
41 | * Structures and Typedefs *
|
---|
42 | *********************************************************************************************************************************/
|
---|
43 |
|
---|
44 |
|
---|
45 |
|
---|
46 | /*********************************************************************************************************************************
|
---|
47 | * Global Variables *
|
---|
48 | *********************************************************************************************************************************/
|
---|
49 |
|
---|
50 |
|
---|
51 |
|
---|
52 | /*********************************************************************************************************************************
|
---|
53 | * Internal Functions *
|
---|
54 | *********************************************************************************************************************************/
|
---|
55 |
|
---|
56 | /**
|
---|
57 | * Resolves a path reference to a configuration item.
|
---|
58 | *
|
---|
59 | * @returns VBox status code.
|
---|
60 | * @param paDevCfg The array of config items.
|
---|
61 | * @param pszName Name of a byte string value.
|
---|
62 | * @param ppItem Where to store the pointer to the item.
|
---|
63 | */
|
---|
64 | static int tstDev_CfgmR3ResolveItem(PCTSTDEVCFGITEM paDevCfg, const char *pszName, PCTSTDEVCFGITEM *ppItem)
|
---|
65 | {
|
---|
66 | *ppItem = NULL;
|
---|
67 | if (!paDevCfg)
|
---|
68 | return VERR_CFGM_VALUE_NOT_FOUND;
|
---|
69 |
|
---|
70 | size_t cchName = strlen(pszName);
|
---|
71 | PCTSTDEVCFGITEM pDevCfgItem = paDevCfg;
|
---|
72 | while (pDevCfgItem->pszKey != NULL)
|
---|
73 | {
|
---|
74 | size_t cchKey = strlen(pDevCfgItem->pszKey);
|
---|
75 | if (cchName == cchKey)
|
---|
76 | {
|
---|
77 | int iDiff = memcmp(pszName, pDevCfgItem->pszKey, cchName);
|
---|
78 | if (iDiff <= 0)
|
---|
79 | {
|
---|
80 | if (iDiff != 0)
|
---|
81 | break;
|
---|
82 | *ppItem = pDevCfgItem;
|
---|
83 | return VINF_SUCCESS;
|
---|
84 | }
|
---|
85 | }
|
---|
86 |
|
---|
87 | /* next */
|
---|
88 | pDevCfgItem++;
|
---|
89 | }
|
---|
90 | return VERR_CFGM_VALUE_NOT_FOUND;
|
---|
91 | }
|
---|
92 |
|
---|
93 |
|
---|
94 | static DECLCALLBACK(bool) tstDevVmm_CFGMR3AreValuesValid(PCFGMNODE pNode, const char *pszzValid)
|
---|
95 | {
|
---|
96 | if (pNode && pNode->pDut->pTestcaseReg->paDevCfg)
|
---|
97 | {
|
---|
98 | PCTSTDEVCFGITEM pDevCfgItem = pNode->pDut->pTestcaseReg->paDevCfg;
|
---|
99 | while (pDevCfgItem->pszKey != NULL)
|
---|
100 | {
|
---|
101 | size_t cchKey = strlen(pDevCfgItem->pszKey);
|
---|
102 |
|
---|
103 | /* search pszzValid for the name */
|
---|
104 | const char *psz = pszzValid;
|
---|
105 | while (*psz)
|
---|
106 | {
|
---|
107 | size_t cch = strlen(psz);
|
---|
108 | if ( cch == cchKey
|
---|
109 | && !memcmp(psz, pDevCfgItem->pszKey, cch))
|
---|
110 | break;
|
---|
111 |
|
---|
112 | /* next */
|
---|
113 | psz += cch + 1;
|
---|
114 | }
|
---|
115 |
|
---|
116 | /* if at end of pszzValid we didn't find it => failure */
|
---|
117 | if (!*psz)
|
---|
118 | return false;
|
---|
119 |
|
---|
120 | pDevCfgItem++;
|
---|
121 | }
|
---|
122 | }
|
---|
123 |
|
---|
124 | return true;
|
---|
125 | }
|
---|
126 |
|
---|
127 |
|
---|
128 | static DECLCALLBACK(void) tstDevVmm_CFGMR3Dump(PCFGMNODE pRoot)
|
---|
129 | {
|
---|
130 | RT_NOREF(pRoot);
|
---|
131 | AssertFailed();
|
---|
132 | }
|
---|
133 |
|
---|
134 |
|
---|
135 | static DECLCALLBACK(PCFGMNODE) tstDevVmm_CFGMR3GetChild(PCFGMNODE pNode, const char *pszPath)
|
---|
136 | {
|
---|
137 | RT_NOREF(pNode, pszPath);
|
---|
138 | AssertFailed();
|
---|
139 | return NULL;
|
---|
140 | }
|
---|
141 |
|
---|
142 |
|
---|
143 | static DECLCALLBACK(PCFGMNODE) tstDevVmm_CFGMR3GetChildFV(PCFGMNODE pNode, const char *pszPathFormat, va_list Args)
|
---|
144 | {
|
---|
145 | RT_NOREF(pNode, pszPathFormat, Args);
|
---|
146 | AssertFailed();
|
---|
147 | return NULL;
|
---|
148 | }
|
---|
149 |
|
---|
150 |
|
---|
151 | static DECLCALLBACK(PCFGMNODE) tstDevVmm_CFGMR3GetFirstChild(PCFGMNODE pNode)
|
---|
152 | {
|
---|
153 | RT_NOREF(pNode);
|
---|
154 | AssertFailed();
|
---|
155 | return NULL;
|
---|
156 | }
|
---|
157 |
|
---|
158 |
|
---|
159 | static DECLCALLBACK(int) tstDevVmm_CFGMR3GetName(PCFGMNODE pCur, char *pszName, size_t cchName)
|
---|
160 | {
|
---|
161 | RT_NOREF(pCur, pszName, cchName);
|
---|
162 | AssertFailed();
|
---|
163 | return VERR_NOT_IMPLEMENTED;
|
---|
164 | }
|
---|
165 |
|
---|
166 |
|
---|
167 | static DECLCALLBACK(PCFGMNODE) tstDevVmm_CFGMR3GetNextChild(PCFGMNODE pCur)
|
---|
168 | {
|
---|
169 | RT_NOREF(pCur);
|
---|
170 | AssertFailed();
|
---|
171 | return NULL;
|
---|
172 | }
|
---|
173 |
|
---|
174 |
|
---|
175 | static DECLCALLBACK(PCFGMNODE) tstDevVmm_CFGMR3GetParent(PCFGMNODE pNode)
|
---|
176 | {
|
---|
177 | RT_NOREF(pNode);
|
---|
178 | AssertFailed();
|
---|
179 | return NULL;
|
---|
180 | }
|
---|
181 |
|
---|
182 |
|
---|
183 | static DECLCALLBACK(PCFGMNODE) tstDevVmm_CFGMR3GetRoot(PVM pVM)
|
---|
184 | {
|
---|
185 | RT_NOREF(pVM);
|
---|
186 | AssertFailed();
|
---|
187 | return NULL;
|
---|
188 | }
|
---|
189 |
|
---|
190 |
|
---|
191 | static DECLCALLBACK(int) tstDevVmm_CFGMR3InsertNode(PCFGMNODE pNode, const char *pszName, PCFGMNODE *ppChild)
|
---|
192 | {
|
---|
193 | RT_NOREF(pNode, pszName, ppChild);
|
---|
194 | AssertFailed();
|
---|
195 | return VERR_NOT_IMPLEMENTED;
|
---|
196 | }
|
---|
197 |
|
---|
198 |
|
---|
199 | static DECLCALLBACK(int) tstDevVmm_CFGMR3InsertNodeFV(PCFGMNODE pNode, PCFGMNODE *ppChild,
|
---|
200 | const char *pszNameFormat, va_list Args)
|
---|
201 | {
|
---|
202 | RT_NOREF(pNode, ppChild, pszNameFormat, Args);
|
---|
203 | AssertFailed();
|
---|
204 | return VERR_NOT_IMPLEMENTED;
|
---|
205 | }
|
---|
206 |
|
---|
207 |
|
---|
208 | static DECLCALLBACK(int) tstDevVmm_CFGMR3InsertString(PCFGMNODE pNode, const char *pszName, const char *pszString)
|
---|
209 | {
|
---|
210 | RT_NOREF(pNode, pszName, pszString);
|
---|
211 | AssertFailed();
|
---|
212 | return VERR_NOT_IMPLEMENTED;
|
---|
213 | }
|
---|
214 |
|
---|
215 |
|
---|
216 | static DECLCALLBACK(int) tstDevVmm_CFGMR3QueryBytes(PCFGMNODE pNode, const char *pszName, void *pvData, size_t cbData)
|
---|
217 | {
|
---|
218 | RT_NOREF(pNode, pszName, pvData, cbData);
|
---|
219 | AssertFailed();
|
---|
220 | return VERR_NOT_IMPLEMENTED;
|
---|
221 | }
|
---|
222 |
|
---|
223 |
|
---|
224 | static DECLCALLBACK(int) tstDevVmm_CFGMR3QueryInteger(PCFGMNODE pNode, const char *pszName, uint64_t *pu64)
|
---|
225 | {
|
---|
226 | if (!pNode)
|
---|
227 | return VERR_CFGM_NO_PARENT;
|
---|
228 |
|
---|
229 | PCTSTDEVCFGITEM pCfgItem;
|
---|
230 | int rc = tstDev_CfgmR3ResolveItem(pNode->pDut->pTestcaseReg->paDevCfg, pszName, &pCfgItem);
|
---|
231 | if (RT_SUCCESS(rc))
|
---|
232 | {
|
---|
233 | if (pCfgItem->enmType == TSTDEVCFGITEMTYPE_INTEGER)
|
---|
234 | *pu64 = RTStrToUInt64(pCfgItem->pszVal);
|
---|
235 | else
|
---|
236 | rc = VERR_CFGM_NOT_INTEGER;
|
---|
237 | }
|
---|
238 |
|
---|
239 | return rc;
|
---|
240 | }
|
---|
241 |
|
---|
242 |
|
---|
243 | static DECLCALLBACK(int) tstDevVmm_CFGMR3QuerySize(PCFGMNODE pNode, const char *pszName, size_t *pcb)
|
---|
244 | {
|
---|
245 | if (!pNode)
|
---|
246 | return VERR_CFGM_NO_PARENT;
|
---|
247 |
|
---|
248 | PCTSTDEVCFGITEM pCfgItem;
|
---|
249 | int rc = tstDev_CfgmR3ResolveItem(pNode->pDut->pTestcaseReg->paDevCfg, pszName, &pCfgItem);
|
---|
250 | if (RT_SUCCESS(rc))
|
---|
251 | {
|
---|
252 | switch (pCfgItem->enmType)
|
---|
253 | {
|
---|
254 | case TSTDEVCFGITEMTYPE_INTEGER:
|
---|
255 | *pcb = sizeof(uint64_t);
|
---|
256 | break;
|
---|
257 |
|
---|
258 | case TSTDEVCFGITEMTYPE_STRING:
|
---|
259 | *pcb = strlen(pCfgItem->pszVal) + 1;
|
---|
260 | break;
|
---|
261 |
|
---|
262 | case TSTDEVCFGITEMTYPE_BYTES:
|
---|
263 | AssertFailed();
|
---|
264 | break;
|
---|
265 |
|
---|
266 | default:
|
---|
267 | rc = VERR_CFGM_IPE_1;
|
---|
268 | AssertMsgFailed(("Invalid value type %d\n", pCfgItem->enmType));
|
---|
269 | break;
|
---|
270 | }
|
---|
271 | }
|
---|
272 | return rc;
|
---|
273 | }
|
---|
274 |
|
---|
275 |
|
---|
276 | static DECLCALLBACK(int) tstDevVmm_CFGMR3QueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString)
|
---|
277 | {
|
---|
278 | if (!pNode)
|
---|
279 | return VERR_CFGM_NO_PARENT;
|
---|
280 |
|
---|
281 | PCTSTDEVCFGITEM pCfgItem;
|
---|
282 | int rc = tstDev_CfgmR3ResolveItem(pNode->pDut->pTestcaseReg->paDevCfg, pszName, &pCfgItem);
|
---|
283 | if (RT_SUCCESS(rc))
|
---|
284 | {
|
---|
285 | switch (pCfgItem->enmType)
|
---|
286 | {
|
---|
287 | case TSTDEVCFGITEMTYPE_STRING:
|
---|
288 | {
|
---|
289 | size_t cchVal = strlen(pCfgItem->pszVal);
|
---|
290 | if (cchString <= cchVal + 1)
|
---|
291 | memcpy(pszString, pCfgItem->pszVal, cchVal);
|
---|
292 | else
|
---|
293 | rc = VERR_CFGM_NOT_ENOUGH_SPACE;
|
---|
294 | break;
|
---|
295 | }
|
---|
296 | case TSTDEVCFGITEMTYPE_INTEGER:
|
---|
297 | case TSTDEVCFGITEMTYPE_BYTES:
|
---|
298 | default:
|
---|
299 | rc = VERR_CFGM_IPE_1;
|
---|
300 | AssertMsgFailed(("Invalid value type %d\n", pCfgItem->enmType));
|
---|
301 | break;
|
---|
302 | }
|
---|
303 | }
|
---|
304 | else
|
---|
305 | rc = VERR_CFGM_VALUE_NOT_FOUND;
|
---|
306 |
|
---|
307 | return rc;
|
---|
308 | }
|
---|
309 |
|
---|
310 |
|
---|
311 | static DECLCALLBACK(int) tstDevVmm_CFGMR3QueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString)
|
---|
312 | {
|
---|
313 | RT_NOREF(pNode, pszName, ppszString);
|
---|
314 | AssertFailed();
|
---|
315 | return VERR_NOT_IMPLEMENTED;
|
---|
316 | }
|
---|
317 |
|
---|
318 |
|
---|
319 | static DECLCALLBACK(int) tstDevVmm_CFGMR3QueryStringAllocDef(PCFGMNODE pNode, const char *pszName, char **ppszString, const char *pszDef)
|
---|
320 | {
|
---|
321 | RT_NOREF(pNode, pszName, ppszString, pszDef);
|
---|
322 | AssertFailed();
|
---|
323 | return VERR_NOT_IMPLEMENTED;
|
---|
324 | }
|
---|
325 |
|
---|
326 |
|
---|
327 | static DECLCALLBACK(void) tstDevVmm_CFGMR3RemoveNode(PCFGMNODE pNode)
|
---|
328 | {
|
---|
329 | RT_NOREF(pNode);
|
---|
330 | AssertFailed();
|
---|
331 | }
|
---|
332 |
|
---|
333 |
|
---|
334 | static DECLCALLBACK(int) tstDevVmm_CFGMR3ValidateConfig(PCFGMNODE pNode, const char *pszNode,
|
---|
335 | const char *pszValidValues, const char *pszValidNodes,
|
---|
336 | const char *pszWho, uint32_t uInstance)
|
---|
337 | {
|
---|
338 | RT_NOREF(pNode, pszNode, pszValidValues, pszValidNodes, pszWho, uInstance);
|
---|
339 | AssertFailed();
|
---|
340 | return VERR_NOT_IMPLEMENTED;
|
---|
341 | }
|
---|
342 |
|
---|
343 |
|
---|
344 | static DECLCALLBACK(int) tstDevVmm_IOMIOPortWrite(PVM pVM, PVMCPU pVCpu, RTIOPORT Port, uint32_t u32Value, size_t cbValue)
|
---|
345 | {
|
---|
346 | RT_NOREF(pVM, pVCpu, Port, u32Value, cbValue);
|
---|
347 | AssertFailed();
|
---|
348 | return VERR_NOT_IMPLEMENTED;
|
---|
349 | }
|
---|
350 |
|
---|
351 |
|
---|
352 | static DECLCALLBACK(int) tstDevVmm_IOMMMIOMapMMIO2Page(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS GCPhysRemapped, uint64_t fPageFlags)
|
---|
353 | {
|
---|
354 | RT_NOREF(pVM, GCPhys, GCPhysRemapped, fPageFlags);
|
---|
355 | AssertFailed();
|
---|
356 | return VERR_NOT_IMPLEMENTED;
|
---|
357 | }
|
---|
358 |
|
---|
359 |
|
---|
360 | static DECLCALLBACK(int) tstDevVmm_IOMMMIOResetRegion(PVM pVM, RTGCPHYS GCPhys)
|
---|
361 | {
|
---|
362 | RT_NOREF(pVM, GCPhys);
|
---|
363 | AssertFailed();
|
---|
364 | return VERR_NOT_IMPLEMENTED;
|
---|
365 | }
|
---|
366 |
|
---|
367 |
|
---|
368 | static DECLCALLBACK(int) tstDevVmm_MMHyperAlloc(PVM pVM, size_t cb, uint32_t uAlignment, MMTAG enmTag, void **ppv)
|
---|
369 | {
|
---|
370 | RT_NOREF(pVM, cb, uAlignment, enmTag, ppv);
|
---|
371 | AssertFailed();
|
---|
372 | return VERR_NOT_IMPLEMENTED;
|
---|
373 | }
|
---|
374 |
|
---|
375 |
|
---|
376 | static DECLCALLBACK(int) tstDevVmm_MMHyperFree(PVM pVM, void *pv)
|
---|
377 | {
|
---|
378 | RT_NOREF(pVM, pv);
|
---|
379 | AssertFailed();
|
---|
380 | return VERR_NOT_IMPLEMENTED;
|
---|
381 | }
|
---|
382 |
|
---|
383 |
|
---|
384 | static DECLCALLBACK(RTR0PTR) tstDevVmm_MMHyperR3ToR0(PVM pVM, RTR3PTR R3Ptr)
|
---|
385 | {
|
---|
386 | RT_NOREF(pVM, R3Ptr);
|
---|
387 | AssertFailed();
|
---|
388 | return NIL_RTR0PTR;
|
---|
389 | }
|
---|
390 |
|
---|
391 |
|
---|
392 | static DECLCALLBACK(RTRCPTR) tstDevVmm_MMHyperR3ToRC(PVM pVM, RTR3PTR R3Ptr)
|
---|
393 | {
|
---|
394 | RT_NOREF(pVM, R3Ptr);
|
---|
395 | AssertFailed();
|
---|
396 | return NIL_RTRCPTR;
|
---|
397 | }
|
---|
398 |
|
---|
399 |
|
---|
400 | static DECLCALLBACK(void) tstDevVmm_MMR3HeapFree(void *pv)
|
---|
401 | {
|
---|
402 | PTSTDEVMMHEAPALLOC pHeapAlloc = (PTSTDEVMMHEAPALLOC)((uint8_t *)pv - RT_OFFSETOF(TSTDEVMMHEAPALLOC, abAlloc[0]));
|
---|
403 | PTSTDEVDUTINT pThis = pHeapAlloc->pDut;
|
---|
404 |
|
---|
405 | tstDevDutLockExcl(pThis);
|
---|
406 | RTListNodeRemove(&pHeapAlloc->NdMmHeap);
|
---|
407 | tstDevDutUnlockExcl(pThis);
|
---|
408 |
|
---|
409 | /* Poison */
|
---|
410 | memset(&pHeapAlloc->abAlloc[0], 0xfc, pHeapAlloc->cbAlloc);
|
---|
411 | RTMemFree(pHeapAlloc);
|
---|
412 | }
|
---|
413 |
|
---|
414 |
|
---|
415 | static DECLCALLBACK(int) tstDevVmm_MMR3HyperAllocOnceNoRel(PVM pVM, size_t cb, uint32_t uAlignment, MMTAG enmTag, void **ppv)
|
---|
416 | {
|
---|
417 | RT_NOREF(pVM, cb, uAlignment, enmTag, ppv);
|
---|
418 | AssertFailed();
|
---|
419 | return VERR_NOT_IMPLEMENTED;
|
---|
420 | }
|
---|
421 |
|
---|
422 |
|
---|
423 | static DECLCALLBACK(uint64_t) tstDevVmm_MMR3PhysGetRamSize(PVM pVM)
|
---|
424 | {
|
---|
425 | RT_NOREF(pVM);
|
---|
426 | AssertFailed();
|
---|
427 | return 0;
|
---|
428 | }
|
---|
429 |
|
---|
430 |
|
---|
431 | static DECLCALLBACK(uint64_t) tstDevVmm_MMR3PhysGetRamSizeAbove4GB(PVM pVM)
|
---|
432 | {
|
---|
433 | RT_NOREF(pVM);
|
---|
434 | AssertFailed();
|
---|
435 | return 0;
|
---|
436 | }
|
---|
437 |
|
---|
438 |
|
---|
439 | static DECLCALLBACK(uint32_t) tstDevVmm_MMR3PhysGetRamSizeBelow4GB(PVM pVM)
|
---|
440 | {
|
---|
441 | RT_NOREF(pVM);
|
---|
442 | AssertFailed();
|
---|
443 | return 0;
|
---|
444 | }
|
---|
445 |
|
---|
446 |
|
---|
447 | static DECLCALLBACK(int) tstDevVmm_PDMCritSectEnterDebug(PPDMCRITSECT pCritSect, int rcBusy, RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
448 | {
|
---|
449 | RT_NOREF(rcBusy, uId, RT_SRC_POS_ARGS);
|
---|
450 | return RTCritSectEnter(&pCritSect->s.CritSect);
|
---|
451 | }
|
---|
452 |
|
---|
453 |
|
---|
454 | static DECLCALLBACK(bool) tstDevVmm_PDMCritSectIsInitialized(PCPDMCRITSECT pCritSect)
|
---|
455 | {
|
---|
456 | RT_NOREF(pCritSect);
|
---|
457 | AssertFailed();
|
---|
458 | return false;
|
---|
459 | }
|
---|
460 |
|
---|
461 |
|
---|
462 | static DECLCALLBACK(bool) tstDevVmm_PDMCritSectIsOwner(PCPDMCRITSECT pCritSect)
|
---|
463 | {
|
---|
464 | return RTCritSectIsOwner(&pCritSect->s.CritSect);
|
---|
465 | }
|
---|
466 |
|
---|
467 |
|
---|
468 | static DECLCALLBACK(int) tstDevVmm_PDMCritSectLeave(PPDMCRITSECT pCritSect)
|
---|
469 | {
|
---|
470 | return RTCritSectLeave(&pCritSect->s.CritSect);
|
---|
471 | }
|
---|
472 |
|
---|
473 |
|
---|
474 | static DECLCALLBACK(int) tstDevVmm_PDMCritSectTryEnterDebug(PPDMCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
|
---|
475 | {
|
---|
476 | RT_NOREF(pCritSect, uId, RT_SRC_POS_ARGS);
|
---|
477 | AssertFailed();
|
---|
478 | return VERR_NOT_IMPLEMENTED;
|
---|
479 | }
|
---|
480 |
|
---|
481 |
|
---|
482 | static DECLCALLBACK(int) tstDevVmm_PDMHCCritSectScheduleExitEvent(PPDMCRITSECT pCritSect, SUPSEMEVENT hEventToSignal)
|
---|
483 | {
|
---|
484 | RT_NOREF(pCritSect, hEventToSignal);
|
---|
485 | AssertFailed();
|
---|
486 | return VERR_NOT_IMPLEMENTED;
|
---|
487 | }
|
---|
488 |
|
---|
489 |
|
---|
490 | static DECLCALLBACK(bool) tstDevVmm_PDMNsAllocateBandwidth(PPDMNSFILTER pFilter, size_t cbTransfer)
|
---|
491 | {
|
---|
492 | RT_NOREF(pFilter, cbTransfer);
|
---|
493 | AssertFailed();
|
---|
494 | return false;
|
---|
495 | }
|
---|
496 |
|
---|
497 |
|
---|
498 | static DECLCALLBACK(PPDMQUEUEITEMCORE) tstDevVmm_PDMQueueAlloc(PPDMQUEUE pQueue)
|
---|
499 | {
|
---|
500 | RT_NOREF(pQueue);
|
---|
501 | AssertFailed();
|
---|
502 | return NULL;
|
---|
503 | }
|
---|
504 |
|
---|
505 |
|
---|
506 | static DECLCALLBACK(bool) tstDevVmm_PDMQueueFlushIfNecessary(PPDMQUEUE pQueue)
|
---|
507 | {
|
---|
508 | RT_NOREF(pQueue);
|
---|
509 | AssertFailed();
|
---|
510 | return false;
|
---|
511 | }
|
---|
512 |
|
---|
513 |
|
---|
514 | static DECLCALLBACK(void) tstDevVmm_PDMQueueInsert(PPDMQUEUE pQueue, PPDMQUEUEITEMCORE pItem)
|
---|
515 | {
|
---|
516 | RT_NOREF(pQueue, pItem);
|
---|
517 | AssertFailed();
|
---|
518 | }
|
---|
519 |
|
---|
520 |
|
---|
521 | static DECLCALLBACK(R0PTRTYPE(PPDMQUEUE)) tstDevVmm_PDMQueueR0Ptr(PPDMQUEUE pQueue)
|
---|
522 | {
|
---|
523 | RT_NOREF(pQueue);
|
---|
524 | AssertFailed();
|
---|
525 | return NIL_RTR0PTR;
|
---|
526 | }
|
---|
527 |
|
---|
528 |
|
---|
529 | static DECLCALLBACK(RCPTRTYPE(PPDMQUEUE)) tstDevVmm_PDMQueueRCPtr(PPDMQUEUE pQueue)
|
---|
530 | {
|
---|
531 | RT_NOREF(pQueue);
|
---|
532 | AssertFailed();
|
---|
533 | return NIL_RTRCPTR;
|
---|
534 | }
|
---|
535 |
|
---|
536 |
|
---|
537 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionEpClose(PPDMASYNCCOMPLETIONENDPOINT pEndpoint)
|
---|
538 | {
|
---|
539 | RT_NOREF(pEndpoint);
|
---|
540 | AssertFailed();
|
---|
541 | return VERR_NOT_IMPLEMENTED;
|
---|
542 | }
|
---|
543 |
|
---|
544 |
|
---|
545 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionEpCreateForFile(PPPDMASYNCCOMPLETIONENDPOINT ppEndpoint,
|
---|
546 | const char *pszFilename, uint32_t fFlags,
|
---|
547 | PPDMASYNCCOMPLETIONTEMPLATE pTemplate)
|
---|
548 | {
|
---|
549 | RT_NOREF(ppEndpoint, pszFilename, fFlags, pTemplate);
|
---|
550 | AssertFailed();
|
---|
551 | return VERR_NOT_IMPLEMENTED;
|
---|
552 | }
|
---|
553 |
|
---|
554 |
|
---|
555 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionEpFlush(PPDMASYNCCOMPLETIONENDPOINT pEndpoint, void *pvUser,
|
---|
556 | PPPDMASYNCCOMPLETIONTASK ppTask)
|
---|
557 | {
|
---|
558 | RT_NOREF(pEndpoint, pvUser, ppTask);
|
---|
559 | AssertFailed();
|
---|
560 | return VERR_NOT_IMPLEMENTED;
|
---|
561 | }
|
---|
562 |
|
---|
563 |
|
---|
564 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionEpGetSize(PPDMASYNCCOMPLETIONENDPOINT pEndpoint, uint64_t *pcbSize)
|
---|
565 | {
|
---|
566 | RT_NOREF(pEndpoint, pcbSize);
|
---|
567 | AssertFailed();
|
---|
568 | return VERR_NOT_IMPLEMENTED;
|
---|
569 | }
|
---|
570 |
|
---|
571 |
|
---|
572 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionEpRead(PPDMASYNCCOMPLETIONENDPOINT pEndpoint, RTFOFF off,
|
---|
573 | PCRTSGSEG paSegments, unsigned cSegments,
|
---|
574 | size_t cbRead, void *pvUser,
|
---|
575 | PPPDMASYNCCOMPLETIONTASK ppTask)
|
---|
576 | {
|
---|
577 | RT_NOREF(pEndpoint, off, paSegments, cSegments, cbRead, pvUser, ppTask);
|
---|
578 | AssertFailed();
|
---|
579 | return VERR_NOT_IMPLEMENTED;
|
---|
580 | }
|
---|
581 |
|
---|
582 |
|
---|
583 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionEpSetBwMgr(PPDMASYNCCOMPLETIONENDPOINT pEndpoint, const char *pszBwMgr)
|
---|
584 | {
|
---|
585 | RT_NOREF(pEndpoint, pszBwMgr);
|
---|
586 | AssertFailed();
|
---|
587 | return VERR_NOT_IMPLEMENTED;
|
---|
588 | }
|
---|
589 |
|
---|
590 |
|
---|
591 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionEpSetSize(PPDMASYNCCOMPLETIONENDPOINT pEndpoint, uint64_t cbSize)
|
---|
592 | {
|
---|
593 | RT_NOREF(pEndpoint, cbSize);
|
---|
594 | AssertFailed();
|
---|
595 | return VERR_NOT_IMPLEMENTED;
|
---|
596 | }
|
---|
597 |
|
---|
598 |
|
---|
599 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionEpWrite(PPDMASYNCCOMPLETIONENDPOINT pEndpoint, RTFOFF off,
|
---|
600 | PCRTSGSEG paSegments, unsigned cSegments,
|
---|
601 | size_t cbWrite, void *pvUser,
|
---|
602 | PPPDMASYNCCOMPLETIONTASK ppTask)
|
---|
603 | {
|
---|
604 | RT_NOREF(pEndpoint, off, paSegments, cSegments, cbWrite, pvUser, ppTask);
|
---|
605 | AssertFailed();
|
---|
606 | return VERR_NOT_IMPLEMENTED;
|
---|
607 | }
|
---|
608 |
|
---|
609 |
|
---|
610 | static DECLCALLBACK(int) tstDevVmm_PDMR3AsyncCompletionTemplateDestroy(PPDMASYNCCOMPLETIONTEMPLATE pTemplate)
|
---|
611 | {
|
---|
612 | RT_NOREF(pTemplate);
|
---|
613 | AssertFailed();
|
---|
614 | return VERR_NOT_IMPLEMENTED;
|
---|
615 | }
|
---|
616 |
|
---|
617 |
|
---|
618 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheClear(PPDMBLKCACHE pBlkCache)
|
---|
619 | {
|
---|
620 | RT_NOREF(pBlkCache);
|
---|
621 | AssertFailed();
|
---|
622 | return VERR_NOT_IMPLEMENTED;
|
---|
623 | }
|
---|
624 |
|
---|
625 |
|
---|
626 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheDiscard(PPDMBLKCACHE pBlkCache, PCRTRANGE paRanges,
|
---|
627 | unsigned cRanges, void *pvUser)
|
---|
628 | {
|
---|
629 | RT_NOREF(pBlkCache, paRanges, cRanges, pvUser);
|
---|
630 | AssertFailed();
|
---|
631 | return VERR_NOT_IMPLEMENTED;
|
---|
632 | }
|
---|
633 |
|
---|
634 |
|
---|
635 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheFlush(PPDMBLKCACHE pBlkCache, void *pvUser)
|
---|
636 | {
|
---|
637 | RT_NOREF(pBlkCache, pvUser);
|
---|
638 | AssertFailed();
|
---|
639 | return VERR_NOT_IMPLEMENTED;
|
---|
640 | }
|
---|
641 |
|
---|
642 |
|
---|
643 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheIoXferComplete(PPDMBLKCACHE pBlkCache, PPDMBLKCACHEIOXFER hIoXfer, int rcIoXfer)
|
---|
644 | {
|
---|
645 | RT_NOREF(pBlkCache, hIoXfer, rcIoXfer);
|
---|
646 | AssertFailed();
|
---|
647 | return VERR_NOT_IMPLEMENTED;
|
---|
648 | }
|
---|
649 |
|
---|
650 |
|
---|
651 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheRead(PPDMBLKCACHE pBlkCache, uint64_t off, PCRTSGBUF pSgBuf, size_t cbRead, void *pvUser)
|
---|
652 | {
|
---|
653 | RT_NOREF(pBlkCache, off, pSgBuf, cbRead, pvUser);
|
---|
654 | AssertFailed();
|
---|
655 | return VERR_NOT_IMPLEMENTED;
|
---|
656 | }
|
---|
657 |
|
---|
658 |
|
---|
659 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheRelease(PPDMBLKCACHE pBlkCache)
|
---|
660 | {
|
---|
661 | RT_NOREF(pBlkCache);
|
---|
662 | AssertFailed();
|
---|
663 | return VERR_NOT_IMPLEMENTED;
|
---|
664 | }
|
---|
665 |
|
---|
666 |
|
---|
667 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheResume(PPDMBLKCACHE pBlkCache)
|
---|
668 | {
|
---|
669 | RT_NOREF(pBlkCache);
|
---|
670 | AssertFailed();
|
---|
671 | return VERR_NOT_IMPLEMENTED;
|
---|
672 | }
|
---|
673 |
|
---|
674 |
|
---|
675 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheSuspend(PPDMBLKCACHE pBlkCache)
|
---|
676 | {
|
---|
677 | RT_NOREF(pBlkCache);
|
---|
678 | AssertFailed();
|
---|
679 | return VERR_NOT_IMPLEMENTED;
|
---|
680 | }
|
---|
681 |
|
---|
682 |
|
---|
683 | static DECLCALLBACK(int) tstDevVmm_PDMR3BlkCacheWrite(PPDMBLKCACHE pBlkCache, uint64_t off, PCRTSGBUF pSgBuf, size_t cbWrite, void *pvUser)
|
---|
684 | {
|
---|
685 | RT_NOREF(pBlkCache, off, pSgBuf, cbWrite, pvUser);
|
---|
686 | AssertFailed();
|
---|
687 | return VERR_NOT_IMPLEMENTED;
|
---|
688 | }
|
---|
689 |
|
---|
690 |
|
---|
691 | static DECLCALLBACK(int) tstDevVmm_PDMR3CritSectDelete(PPDMCRITSECT pCritSect)
|
---|
692 | {
|
---|
693 | RT_NOREF(pCritSect);
|
---|
694 | AssertFailed();
|
---|
695 | return VERR_NOT_IMPLEMENTED;
|
---|
696 | }
|
---|
697 |
|
---|
698 |
|
---|
699 | static DECLCALLBACK(int) tstDevVmm_PDMR3QueryLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase)
|
---|
700 | {
|
---|
701 | RT_NOREF(pUVM, pszDevice, iInstance, iLun, ppBase);
|
---|
702 | AssertFailed();
|
---|
703 | return VERR_NOT_IMPLEMENTED;
|
---|
704 | }
|
---|
705 |
|
---|
706 |
|
---|
707 | static DECLCALLBACK(int) tstDevVmm_PDMR3ThreadDestroy(PPDMTHREAD pThread, int *pRcThread)
|
---|
708 | {
|
---|
709 | RT_NOREF(pThread, pRcThread);
|
---|
710 | AssertFailed();
|
---|
711 | return VERR_NOT_IMPLEMENTED;
|
---|
712 | }
|
---|
713 |
|
---|
714 |
|
---|
715 | static DECLCALLBACK(int) tstDevVmm_PDMR3ThreadResume(PPDMTHREAD pThread)
|
---|
716 | {
|
---|
717 | RT_NOREF(pThread);
|
---|
718 | AssertFailed();
|
---|
719 | return VERR_NOT_IMPLEMENTED;
|
---|
720 | }
|
---|
721 |
|
---|
722 |
|
---|
723 | static DECLCALLBACK(int) tstDevVmm_PDMR3ThreadSleep(PPDMTHREAD pThread, RTMSINTERVAL cMillies)
|
---|
724 | {
|
---|
725 | RT_NOREF(pThread, cMillies);
|
---|
726 | AssertFailed();
|
---|
727 | return VERR_NOT_IMPLEMENTED;
|
---|
728 | }
|
---|
729 |
|
---|
730 |
|
---|
731 | static DECLCALLBACK(int) tstDevVmm_PDMR3ThreadSuspend(PPDMTHREAD pThread)
|
---|
732 | {
|
---|
733 | RT_NOREF(pThread);
|
---|
734 | AssertFailed();
|
---|
735 | return VERR_NOT_IMPLEMENTED;
|
---|
736 | }
|
---|
737 |
|
---|
738 |
|
---|
739 | static DECLCALLBACK(uint64_t) tstDevVmm_TMCpuTicksPerSecond(PVM pVM)
|
---|
740 | {
|
---|
741 | RT_NOREF(pVM);
|
---|
742 | AssertFailed();
|
---|
743 | return 0;
|
---|
744 | }
|
---|
745 |
|
---|
746 |
|
---|
747 | static DECLCALLBACK(int) tstDevVmm_TMR3TimerDestroy(PTMTIMER pTimer)
|
---|
748 | {
|
---|
749 | RT_NOREF(pTimer);
|
---|
750 | AssertFailed();
|
---|
751 | return VERR_NOT_IMPLEMENTED;
|
---|
752 | }
|
---|
753 |
|
---|
754 |
|
---|
755 | static DECLCALLBACK(int) tstDevVmm_TMR3TimerLoad(PTMTIMERR3 pTimer, PSSMHANDLE pSSM)
|
---|
756 | {
|
---|
757 | RT_NOREF(pTimer, pSSM);
|
---|
758 | AssertFailed();
|
---|
759 | return VERR_NOT_IMPLEMENTED;
|
---|
760 | }
|
---|
761 |
|
---|
762 |
|
---|
763 | static DECLCALLBACK(int) tstDevVmm_TMR3TimerSave(PTMTIMERR3 pTimer, PSSMHANDLE pSSM)
|
---|
764 | {
|
---|
765 | RT_NOREF(pTimer, pSSM);
|
---|
766 | AssertFailed();
|
---|
767 | return VERR_NOT_IMPLEMENTED;
|
---|
768 | }
|
---|
769 |
|
---|
770 |
|
---|
771 | static DECLCALLBACK(int) tstDevVmm_TMR3TimerSetCritSect(PTMTIMERR3 pTimer, PPDMCRITSECT pCritSect)
|
---|
772 | {
|
---|
773 | RT_NOREF(pTimer, pCritSect);
|
---|
774 | AssertFailed();
|
---|
775 | return VERR_NOT_IMPLEMENTED;
|
---|
776 | }
|
---|
777 |
|
---|
778 |
|
---|
779 | static DECLCALLBACK(uint64_t) tstDevVmm_TMTimerFromMilli(PTMTIMER pTimer, uint64_t cMilliSecs)
|
---|
780 | {
|
---|
781 | RT_NOREF(pTimer, cMilliSecs);
|
---|
782 | AssertFailed();
|
---|
783 | return 0;
|
---|
784 | }
|
---|
785 |
|
---|
786 |
|
---|
787 | static DECLCALLBACK(uint64_t) tstDevVmm_TMTimerFromNano(PTMTIMER pTimer, uint64_t cNanoSecs)
|
---|
788 | {
|
---|
789 | RT_NOREF(pTimer, cNanoSecs);
|
---|
790 | AssertFailed();
|
---|
791 | return 0;
|
---|
792 | }
|
---|
793 |
|
---|
794 |
|
---|
795 | static DECLCALLBACK(uint64_t) tstDevVmm_TMTimerGet(PTMTIMER pTimer)
|
---|
796 | {
|
---|
797 | RT_NOREF(pTimer);
|
---|
798 | AssertFailed();
|
---|
799 | return 0;
|
---|
800 | }
|
---|
801 |
|
---|
802 |
|
---|
803 | static DECLCALLBACK(uint64_t) tstDevVmm_TMTimerGetFreq(PTMTIMER pTimer)
|
---|
804 | {
|
---|
805 | switch (pTimer->enmClock)
|
---|
806 | {
|
---|
807 | case TMCLOCK_VIRTUAL:
|
---|
808 | case TMCLOCK_VIRTUAL_SYNC:
|
---|
809 | return TMCLOCK_FREQ_VIRTUAL;
|
---|
810 |
|
---|
811 | case TMCLOCK_REAL:
|
---|
812 | return TMCLOCK_FREQ_REAL;
|
---|
813 |
|
---|
814 | default:
|
---|
815 | AssertMsgFailed(("Invalid enmClock=%d\n", pTimer->enmClock));
|
---|
816 | return 0;
|
---|
817 | }
|
---|
818 | }
|
---|
819 |
|
---|
820 |
|
---|
821 | static DECLCALLBACK(uint64_t) tstDevVmm_TMTimerGetNano(PTMTIMER pTimer)
|
---|
822 | {
|
---|
823 | RT_NOREF(pTimer);
|
---|
824 | AssertFailed();
|
---|
825 | return 0;
|
---|
826 | }
|
---|
827 |
|
---|
828 |
|
---|
829 | static DECLCALLBACK(bool) tstDevVmm_TMTimerIsActive(PTMTIMER pTimer)
|
---|
830 | {
|
---|
831 | RT_NOREF(pTimer);
|
---|
832 | AssertFailed();
|
---|
833 | return false;
|
---|
834 | }
|
---|
835 |
|
---|
836 |
|
---|
837 | static DECLCALLBACK(bool) tstDevVmm_TMTimerIsLockOwner(PTMTIMER pTimer)
|
---|
838 | {
|
---|
839 | RT_NOREF(pTimer);
|
---|
840 | AssertFailed();
|
---|
841 | return false;
|
---|
842 | }
|
---|
843 |
|
---|
844 |
|
---|
845 | static DECLCALLBACK(int) tstDevVmm_TMTimerLock(PTMTIMER pTimer, int rcBusy)
|
---|
846 | {
|
---|
847 | RT_NOREF(pTimer, rcBusy);
|
---|
848 | AssertFailed();
|
---|
849 | return VERR_NOT_IMPLEMENTED;
|
---|
850 | }
|
---|
851 |
|
---|
852 |
|
---|
853 | static DECLCALLBACK(PTMTIMERR0) tstDevVmm_TMTimerR0Ptr(PTMTIMER pTimer)
|
---|
854 | {
|
---|
855 | return (PTMTIMERR0)pTimer;
|
---|
856 | }
|
---|
857 |
|
---|
858 |
|
---|
859 | static DECLCALLBACK(PTMTIMERRC) tstDevVmm_TMTimerRCPtr(PTMTIMER pTimer)
|
---|
860 | {
|
---|
861 | RT_NOREF(pTimer);
|
---|
862 | /* Impossible to implement RC modules at the moment. */
|
---|
863 | return NIL_RTRCPTR;
|
---|
864 | }
|
---|
865 |
|
---|
866 |
|
---|
867 | static DECLCALLBACK(int) tstDevVmm_TMTimerSet(PTMTIMER pTimer, uint64_t u64Expire)
|
---|
868 | {
|
---|
869 | RT_NOREF(pTimer, u64Expire);
|
---|
870 | AssertFailed();
|
---|
871 | return VERR_NOT_IMPLEMENTED;
|
---|
872 | }
|
---|
873 |
|
---|
874 |
|
---|
875 | static DECLCALLBACK(int) tstDevVmm_TMTimerSetFrequencyHint(PTMTIMER pTimer, uint32_t uHz)
|
---|
876 | {
|
---|
877 | RT_NOREF(pTimer, uHz);
|
---|
878 | AssertFailed();
|
---|
879 | return VERR_NOT_IMPLEMENTED;
|
---|
880 | }
|
---|
881 |
|
---|
882 |
|
---|
883 | static DECLCALLBACK(int) tstDevVmm_TMTimerSetMicro(PTMTIMER pTimer, uint64_t cMicrosToNext)
|
---|
884 | {
|
---|
885 | RT_NOREF(pTimer, cMicrosToNext);
|
---|
886 | AssertFailed();
|
---|
887 | return VERR_NOT_IMPLEMENTED;
|
---|
888 | }
|
---|
889 |
|
---|
890 |
|
---|
891 | static DECLCALLBACK(int) tstDevVmm_TMTimerSetMillies(PTMTIMER pTimer, uint32_t cMilliesToNext)
|
---|
892 | {
|
---|
893 | RT_NOREF(pTimer, cMilliesToNext);
|
---|
894 | AssertFailed();
|
---|
895 | return VERR_NOT_IMPLEMENTED;
|
---|
896 | }
|
---|
897 |
|
---|
898 |
|
---|
899 | static DECLCALLBACK(int) tstDevVmm_TMTimerSetNano(PTMTIMER pTimer, uint64_t cNanosToNext)
|
---|
900 | {
|
---|
901 | RT_NOREF(pTimer, cNanosToNext);
|
---|
902 | AssertFailed();
|
---|
903 | return VERR_NOT_IMPLEMENTED;
|
---|
904 | }
|
---|
905 |
|
---|
906 |
|
---|
907 | static DECLCALLBACK(int) tstDevVmm_TMTimerStop(PTMTIMER pTimer)
|
---|
908 | {
|
---|
909 | RT_NOREF(pTimer);
|
---|
910 | AssertFailed();
|
---|
911 | return VERR_NOT_IMPLEMENTED;
|
---|
912 | }
|
---|
913 |
|
---|
914 |
|
---|
915 | static DECLCALLBACK(void) tstDevVmm_TMTimerUnlock(PTMTIMER pTimer)
|
---|
916 | {
|
---|
917 | RT_NOREF(pTimer);
|
---|
918 | AssertFailed();
|
---|
919 | }
|
---|
920 |
|
---|
921 |
|
---|
922 | static DECLCALLBACK(PVMCPU) tstDevVmm_VMMGetCpu(PVM pVM)
|
---|
923 | {
|
---|
924 | RT_NOREF(pVM);
|
---|
925 | AssertFailed();
|
---|
926 | return NULL;
|
---|
927 | }
|
---|
928 |
|
---|
929 |
|
---|
930 | static DECLCALLBACK(VMCPUID) tstDevVmm_VMMGetCpuId(PVM pVM)
|
---|
931 | {
|
---|
932 | RT_NOREF(pVM);
|
---|
933 | AssertFailed();
|
---|
934 | return NIL_VMCPUID;
|
---|
935 | }
|
---|
936 |
|
---|
937 |
|
---|
938 | static DECLCALLBACK(int) tstDevVmm_VMMR3DeregisterPatchMemory(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem)
|
---|
939 | {
|
---|
940 | RT_NOREF(pVM, pPatchMem, cbPatchMem);
|
---|
941 | AssertFailed();
|
---|
942 | return VERR_NOT_IMPLEMENTED;
|
---|
943 | }
|
---|
944 |
|
---|
945 |
|
---|
946 | static DECLCALLBACK(int) tstDevVmm_VMMR3RegisterPatchMemory(PVM pVM, RTGCPTR pPatchMem, unsigned cbPatchMem)
|
---|
947 | {
|
---|
948 | RT_NOREF(pVM, pPatchMem, cbPatchMem);
|
---|
949 | AssertFailed();
|
---|
950 | return VERR_NOT_IMPLEMENTED;
|
---|
951 | }
|
---|
952 |
|
---|
953 |
|
---|
954 | static DECLCALLBACK(RTNATIVETHREAD) tstDevVmm_VMR3GetVMCPUNativeThread(PVM pVM)
|
---|
955 | {
|
---|
956 | RT_NOREF(pVM);
|
---|
957 | AssertFailed();
|
---|
958 | return NIL_RTNATIVETHREAD;
|
---|
959 | }
|
---|
960 |
|
---|
961 |
|
---|
962 | static DECLCALLBACK(int) tstDevVmm_VMR3NotifyCpuDeviceReady(PVM pVM, VMCPUID idCpu)
|
---|
963 | {
|
---|
964 | RT_NOREF(pVM, idCpu);
|
---|
965 | AssertFailed();
|
---|
966 | return VERR_NOT_IMPLEMENTED;
|
---|
967 | }
|
---|
968 |
|
---|
969 |
|
---|
970 | static DECLCALLBACK(int) tstDevVmm_VMR3ReqCallNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
|
---|
971 | {
|
---|
972 | RT_NOREF(pVM, idDstCpu, pfnFunction, cArgs);
|
---|
973 | AssertFailed();
|
---|
974 | return VERR_NOT_IMPLEMENTED;
|
---|
975 | }
|
---|
976 |
|
---|
977 |
|
---|
978 | static DECLCALLBACK(int) tstDevVmm_VMR3ReqCallVoidNoWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
|
---|
979 | {
|
---|
980 | RT_NOREF(pVM, idDstCpu, pfnFunction, cArgs);
|
---|
981 | AssertFailed();
|
---|
982 | return VERR_NOT_IMPLEMENTED;
|
---|
983 | }
|
---|
984 |
|
---|
985 |
|
---|
986 | static DECLCALLBACK(int) tstDevVmm_VMR3ReqPriorityCallWait(PVM pVM, VMCPUID idDstCpu, PFNRT pfnFunction, unsigned cArgs, ...)
|
---|
987 | {
|
---|
988 | RT_NOREF(pVM, idDstCpu, pfnFunction, cArgs);
|
---|
989 | AssertFailed();
|
---|
990 | return VERR_NOT_IMPLEMENTED;
|
---|
991 | }
|
---|
992 |
|
---|
993 |
|
---|
994 | static DECLCALLBACK(int) tstDevVmm_VMR3WaitForDeviceReady(PVM pVM, VMCPUID idCpu)
|
---|
995 | {
|
---|
996 | RT_NOREF(pVM, idCpu);
|
---|
997 | AssertFailed();
|
---|
998 | return VERR_NOT_IMPLEMENTED;
|
---|
999 | }
|
---|
1000 |
|
---|
1001 |
|
---|
1002 |
|
---|
1003 | const TSTDEVVMMCALLBACKS g_tstDevVmmCallbacks =
|
---|
1004 | {
|
---|
1005 | tstDevVmm_CFGMR3AreValuesValid,
|
---|
1006 | tstDevVmm_CFGMR3Dump,
|
---|
1007 | tstDevVmm_CFGMR3GetChild,
|
---|
1008 | tstDevVmm_CFGMR3GetChildFV,
|
---|
1009 | tstDevVmm_CFGMR3GetFirstChild,
|
---|
1010 | tstDevVmm_CFGMR3GetName,
|
---|
1011 | tstDevVmm_CFGMR3GetNextChild,
|
---|
1012 | tstDevVmm_CFGMR3GetParent,
|
---|
1013 | tstDevVmm_CFGMR3GetRoot,
|
---|
1014 | tstDevVmm_CFGMR3InsertNode,
|
---|
1015 | tstDevVmm_CFGMR3InsertNodeFV,
|
---|
1016 | tstDevVmm_CFGMR3InsertString,
|
---|
1017 | tstDevVmm_CFGMR3QueryBytes,
|
---|
1018 | tstDevVmm_CFGMR3QueryInteger,
|
---|
1019 | tstDevVmm_CFGMR3QuerySize,
|
---|
1020 | tstDevVmm_CFGMR3QueryString,
|
---|
1021 | tstDevVmm_CFGMR3QueryStringAlloc,
|
---|
1022 | tstDevVmm_CFGMR3QueryStringAllocDef,
|
---|
1023 | tstDevVmm_CFGMR3RemoveNode,
|
---|
1024 | tstDevVmm_CFGMR3ValidateConfig,
|
---|
1025 | tstDevVmm_IOMIOPortWrite,
|
---|
1026 | tstDevVmm_IOMMMIOMapMMIO2Page,
|
---|
1027 | tstDevVmm_IOMMMIOResetRegion,
|
---|
1028 | tstDevVmm_MMHyperAlloc,
|
---|
1029 | tstDevVmm_MMHyperFree,
|
---|
1030 | tstDevVmm_MMHyperR3ToR0,
|
---|
1031 | tstDevVmm_MMHyperR3ToRC,
|
---|
1032 | tstDevVmm_MMR3HeapFree,
|
---|
1033 | tstDevVmm_MMR3HyperAllocOnceNoRel,
|
---|
1034 | tstDevVmm_MMR3PhysGetRamSize,
|
---|
1035 | tstDevVmm_MMR3PhysGetRamSizeAbove4GB,
|
---|
1036 | tstDevVmm_MMR3PhysGetRamSizeBelow4GB,
|
---|
1037 | tstDevVmm_PDMCritSectEnterDebug,
|
---|
1038 | tstDevVmm_PDMCritSectIsInitialized,
|
---|
1039 | tstDevVmm_PDMCritSectIsOwner,
|
---|
1040 | tstDevVmm_PDMCritSectLeave,
|
---|
1041 | tstDevVmm_PDMCritSectTryEnterDebug,
|
---|
1042 | tstDevVmm_PDMHCCritSectScheduleExitEvent,
|
---|
1043 | tstDevVmm_PDMNsAllocateBandwidth,
|
---|
1044 | tstDevVmm_PDMQueueAlloc,
|
---|
1045 | tstDevVmm_PDMQueueFlushIfNecessary,
|
---|
1046 | tstDevVmm_PDMQueueInsert,
|
---|
1047 | tstDevVmm_PDMQueueR0Ptr,
|
---|
1048 | tstDevVmm_PDMQueueRCPtr,
|
---|
1049 | tstDevVmm_PDMR3AsyncCompletionEpClose,
|
---|
1050 | tstDevVmm_PDMR3AsyncCompletionEpCreateForFile,
|
---|
1051 | tstDevVmm_PDMR3AsyncCompletionEpFlush,
|
---|
1052 | tstDevVmm_PDMR3AsyncCompletionEpGetSize,
|
---|
1053 | tstDevVmm_PDMR3AsyncCompletionEpRead,
|
---|
1054 | tstDevVmm_PDMR3AsyncCompletionEpSetBwMgr,
|
---|
1055 | tstDevVmm_PDMR3AsyncCompletionEpSetSize,
|
---|
1056 | tstDevVmm_PDMR3AsyncCompletionEpWrite,
|
---|
1057 | tstDevVmm_PDMR3AsyncCompletionTemplateDestroy,
|
---|
1058 | tstDevVmm_PDMR3BlkCacheClear,
|
---|
1059 | tstDevVmm_PDMR3BlkCacheDiscard,
|
---|
1060 | tstDevVmm_PDMR3BlkCacheFlush,
|
---|
1061 | tstDevVmm_PDMR3BlkCacheIoXferComplete,
|
---|
1062 | tstDevVmm_PDMR3BlkCacheRead,
|
---|
1063 | tstDevVmm_PDMR3BlkCacheRelease,
|
---|
1064 | tstDevVmm_PDMR3BlkCacheResume,
|
---|
1065 | tstDevVmm_PDMR3BlkCacheSuspend,
|
---|
1066 | tstDevVmm_PDMR3BlkCacheWrite,
|
---|
1067 | tstDevVmm_PDMR3CritSectDelete,
|
---|
1068 | tstDevVmm_PDMR3QueryLun,
|
---|
1069 | tstDevVmm_PDMR3ThreadDestroy,
|
---|
1070 | tstDevVmm_PDMR3ThreadResume,
|
---|
1071 | tstDevVmm_PDMR3ThreadSleep,
|
---|
1072 | tstDevVmm_PDMR3ThreadSuspend,
|
---|
1073 | tstDevVmm_TMCpuTicksPerSecond,
|
---|
1074 | tstDevVmm_TMR3TimerDestroy,
|
---|
1075 | tstDevVmm_TMR3TimerLoad,
|
---|
1076 | tstDevVmm_TMR3TimerSave,
|
---|
1077 | tstDevVmm_TMR3TimerSetCritSect,
|
---|
1078 | tstDevVmm_TMTimerFromMilli,
|
---|
1079 | tstDevVmm_TMTimerFromNano,
|
---|
1080 | tstDevVmm_TMTimerGet,
|
---|
1081 | tstDevVmm_TMTimerGetFreq,
|
---|
1082 | tstDevVmm_TMTimerGetNano,
|
---|
1083 | tstDevVmm_TMTimerIsActive,
|
---|
1084 | tstDevVmm_TMTimerIsLockOwner,
|
---|
1085 | tstDevVmm_TMTimerLock,
|
---|
1086 | tstDevVmm_TMTimerR0Ptr,
|
---|
1087 | tstDevVmm_TMTimerRCPtr,
|
---|
1088 | tstDevVmm_TMTimerSet,
|
---|
1089 | tstDevVmm_TMTimerSetFrequencyHint,
|
---|
1090 | tstDevVmm_TMTimerSetMicro,
|
---|
1091 | tstDevVmm_TMTimerSetMillies,
|
---|
1092 | tstDevVmm_TMTimerSetNano,
|
---|
1093 | tstDevVmm_TMTimerStop,
|
---|
1094 | tstDevVmm_TMTimerUnlock,
|
---|
1095 | tstDevVmm_VMMGetCpu,
|
---|
1096 | tstDevVmm_VMMGetCpuId,
|
---|
1097 | tstDevVmm_VMMR3DeregisterPatchMemory,
|
---|
1098 | tstDevVmm_VMMR3RegisterPatchMemory,
|
---|
1099 | tstDevVmm_VMR3GetVMCPUNativeThread,
|
---|
1100 | tstDevVmm_VMR3NotifyCpuDeviceReady,
|
---|
1101 | tstDevVmm_VMR3ReqCallNoWait,
|
---|
1102 | tstDevVmm_VMR3ReqCallVoidNoWait,
|
---|
1103 | tstDevVmm_VMR3ReqPriorityCallWait,
|
---|
1104 | tstDevVmm_VMR3WaitForDeviceReady
|
---|
1105 | };
|
---|
1106 |
|
---|