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