- Timestamp:
- May 22, 2020 12:55:07 PM (5 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r84458 r84459 140 140 VMMR3/PDMDevice.cpp \ 141 141 VMMR3/PDMDevHlp.cpp \ 142 $(if-expr defined(VBOX_WITH_DBGF_TRACING), VMMR3/PDMDevHlpTracing.cpp,) \ 142 143 VMMR3/PDMDevMiscHlp.cpp \ 143 144 VMMR3/PDMDriver.cpp \ … … 508 509 VMMR0/PDMR0Device.cpp \ 509 510 VMMR0/PDMR0DevHlp.cpp \ 511 $(if-expr defined(VBOX_WITH_DBGF_TRACING), VMMR0/PDMR0DevHlpTracing.cpp,) \ 510 512 VMMR0/PDMR0Driver.cpp \ 511 513 VMMR0/PGMR0.cpp \ -
trunk/src/VBox/VMM/VMMR0/PDMR0DevHlp.cpp
r84332 r84459 61 61 * Internal Functions * 62 62 *********************************************************************************************************************************/ 63 static bool pdmR0IsaSetIrq(PGVM pGVM, int iIrq, int iLevel, uint32_t uTagSrc);64 63 65 64 … … 1364 1363 }; 1365 1364 1365 1366 #ifdef VBOX_WITH_DBGF_TRACING 1367 /** 1368 * The Ring-0 Device Helper Callbacks - tracing variant. 1369 */ 1370 extern DECLEXPORT(const PDMDEVHLPR0) g_pdmR0DevHlpTracing = 1371 { 1372 PDM_DEVHLPR0_VERSION, 1373 pdmR0DevHlpTracing_IoPortSetUpContextEx, 1374 pdmR0DevHlpTracing_MmioSetUpContextEx, 1375 pdmR0DevHlp_Mmio2SetUpContext, 1376 pdmR0DevHlpTracing_PCIPhysRead, 1377 pdmR0DevHlpTracing_PCIPhysWrite, 1378 pdmR0DevHlpTracing_PCISetIrq, 1379 pdmR0DevHlpTracing_ISASetIrq, 1380 pdmR0DevHlpTracing_IoApicSendMsi, 1381 pdmR0DevHlp_PhysRead, 1382 pdmR0DevHlp_PhysWrite, 1383 pdmR0DevHlp_A20IsEnabled, 1384 pdmR0DevHlp_VMState, 1385 pdmR0DevHlp_VMSetError, 1386 pdmR0DevHlp_VMSetErrorV, 1387 pdmR0DevHlp_VMSetRuntimeError, 1388 pdmR0DevHlp_VMSetRuntimeErrorV, 1389 pdmR0DevHlp_GetVM, 1390 pdmR0DevHlp_GetVMCPU, 1391 pdmR0DevHlp_GetCurrentCpuId, 1392 pdmR0DevHlp_TimerToPtr, 1393 pdmR0DevHlp_TimerFromMicro, 1394 pdmR0DevHlp_TimerFromMilli, 1395 pdmR0DevHlp_TimerFromNano, 1396 pdmR0DevHlp_TimerGet, 1397 pdmR0DevHlp_TimerGetFreq, 1398 pdmR0DevHlp_TimerGetNano, 1399 pdmR0DevHlp_TimerIsActive, 1400 pdmR0DevHlp_TimerIsLockOwner, 1401 pdmR0DevHlp_TimerLockClock, 1402 pdmR0DevHlp_TimerLockClock2, 1403 pdmR0DevHlp_TimerSet, 1404 pdmR0DevHlp_TimerSetFrequencyHint, 1405 pdmR0DevHlp_TimerSetMicro, 1406 pdmR0DevHlp_TimerSetMillies, 1407 pdmR0DevHlp_TimerSetNano, 1408 pdmR0DevHlp_TimerSetRelative, 1409 pdmR0DevHlp_TimerStop, 1410 pdmR0DevHlp_TimerUnlockClock, 1411 pdmR0DevHlp_TimerUnlockClock2, 1412 pdmR0DevHlp_TMTimeVirtGet, 1413 pdmR0DevHlp_TMTimeVirtGetFreq, 1414 pdmR0DevHlp_TMTimeVirtGetNano, 1415 pdmR0DevHlp_QueueToPtr, 1416 pdmR0DevHlp_QueueAlloc, 1417 pdmR0DevHlp_QueueInsert, 1418 pdmR0DevHlp_QueueInsertEx, 1419 pdmR0DevHlp_QueueFlushIfNecessary, 1420 pdmR0DevHlp_TaskTrigger, 1421 pdmR0DevHlp_SUPSemEventSignal, 1422 pdmR0DevHlp_SUPSemEventWaitNoResume, 1423 pdmR0DevHlp_SUPSemEventWaitNsAbsIntr, 1424 pdmR0DevHlp_SUPSemEventWaitNsRelIntr, 1425 pdmR0DevHlp_SUPSemEventGetResolution, 1426 pdmR0DevHlp_SUPSemEventMultiSignal, 1427 pdmR0DevHlp_SUPSemEventMultiReset, 1428 pdmR0DevHlp_SUPSemEventMultiWaitNoResume, 1429 pdmR0DevHlp_SUPSemEventMultiWaitNsAbsIntr, 1430 pdmR0DevHlp_SUPSemEventMultiWaitNsRelIntr, 1431 pdmR0DevHlp_SUPSemEventMultiGetResolution, 1432 pdmR0DevHlp_CritSectGetNop, 1433 pdmR0DevHlp_SetDeviceCritSect, 1434 pdmR0DevHlp_CritSectEnter, 1435 pdmR0DevHlp_CritSectEnterDebug, 1436 pdmR0DevHlp_CritSectTryEnter, 1437 pdmR0DevHlp_CritSectTryEnterDebug, 1438 pdmR0DevHlp_CritSectLeave, 1439 pdmR0DevHlp_CritSectIsOwner, 1440 pdmR0DevHlp_CritSectIsInitialized, 1441 pdmR0DevHlp_CritSectHasWaiters, 1442 pdmR0DevHlp_CritSectGetRecursion, 1443 pdmR0DevHlp_CritSectScheduleExitEvent, 1444 pdmR0DevHlp_DBGFTraceBuf, 1445 pdmR0DevHlp_PCIBusSetUpContext, 1446 pdmR0DevHlp_IommuSetUpContext, 1447 pdmR0DevHlp_PICSetUpContext, 1448 pdmR0DevHlp_ApicSetUpContext, 1449 pdmR0DevHlp_IoApicSetUpContext, 1450 pdmR0DevHlp_HpetSetUpContext, 1451 NULL /*pfnReserved1*/, 1452 NULL /*pfnReserved2*/, 1453 NULL /*pfnReserved3*/, 1454 NULL /*pfnReserved4*/, 1455 NULL /*pfnReserved5*/, 1456 NULL /*pfnReserved6*/, 1457 NULL /*pfnReserved7*/, 1458 NULL /*pfnReserved8*/, 1459 NULL /*pfnReserved9*/, 1460 NULL /*pfnReserved10*/, 1461 PDM_DEVHLPR0_VERSION 1462 }; 1463 #endif 1464 1465 1366 1466 /** @} */ 1367 1467 … … 1643 1743 * @remarks The caller holds the PDM lock. 1644 1744 */ 1645 static boolpdmR0IsaSetIrq(PGVM pGVM, int iIrq, int iLevel, uint32_t uTagSrc)1745 DECLHIDDEN(bool) pdmR0IsaSetIrq(PGVM pGVM, int iIrq, int iLevel, uint32_t uTagSrc) 1646 1746 { 1647 1747 if (RT_LIKELY( ( pGVM->pdm.s.IoApic.pDevInsR0 -
trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp
r84007 r84459 54 54 RT_C_DECLS_BEGIN 55 55 extern DECLEXPORT(const PDMDEVHLPR0) g_pdmR0DevHlp; 56 #ifdef VBOX_WITH_DBGF_TRACING 57 extern DECLEXPORT(const PDMDEVHLPR0) g_pdmR0DevHlpTracing; 58 #endif 56 59 extern DECLEXPORT(const PDMPICHLP) g_pdmR0PicHlp; 57 60 extern DECLEXPORT(const PDMIOAPICHLP) g_pdmR0IoApicHlp; … … 139 142 140 143 /* 144 * Free the DBGF tracing tracking structures if necessary. 145 */ 146 if (pDevIns->Internal.s.hDbgfTraceEvtSrc != NIL_DBGFTRACEREVTSRC) 147 { 148 RTR0MemObjFree(pDevIns->Internal.s.hDbgfTraceObj, true); 149 pDevIns->Internal.s.hDbgfTraceObj = NIL_RTR0MEMOBJ; 150 } 151 152 /* 141 153 * Free the ring-3 mapping and instance memory. 142 154 */ … … 222 234 * 223 235 * @returns VBox status code. 224 * @param pGVM The global (ring-0) VM structure. 225 * @param pDevReg The device registration structure. 226 * @param iInstance The device instance number. 227 * @param cbInstanceR3 The size of the ring-3 instance data. 228 * @param cbInstanceRC The size of the raw-mode instance data. 229 * @param hMod The module implementing the device. On success, the 230 * @param RCPtrMapping The raw-mode context mapping address, NIL_RTGCPTR if 231 * not to include raw-mode. 232 * @param ppDevInsR3 Where to return the ring-3 device instance address. 236 * @param pGVM The global (ring-0) VM structure. 237 * @param pDevReg The device registration structure. 238 * @param iInstance The device instance number. 239 * @param cbInstanceR3 The size of the ring-3 instance data. 240 * @param cbInstanceRC The size of the raw-mode instance data. 241 * @param hMod The module implementing the device. 242 * @param hDbgfTraceEvtSrc The DBGF tarcer event source handle. 243 * @param RCPtrMapping The raw-mode context mapping address, NIL_RTGCPTR if 244 * not to include raw-mode. 245 * @param ppDevInsR3 Where to return the ring-3 device instance address. 233 246 * @thread EMT(0) 234 247 */ 235 248 static int pdmR0DeviceCreateWorker(PGVM pGVM, PCPDMDEVREGR0 pDevReg, uint32_t iInstance, uint32_t cbInstanceR3, 236 uint32_t cbInstanceRC, RTRGPTR RCPtrMapping, void *hMod, PPDMDEVINSR3 *ppDevInsR3) 249 uint32_t cbInstanceRC, RTRGPTR RCPtrMapping, DBGFTRACEREVTSRC hDbgfTraceEvtSrc, 250 void *hMod, PPDMDEVINSR3 *ppDevInsR3) 237 251 { 238 252 /* … … 285 299 pDevIns->u32Version = PDM_DEVINSR0_VERSION; 286 300 pDevIns->iInstance = iInstance; 301 #ifdef VBOX_WITH_DBGF_TRACING 302 pDevIns->pHlpR0 = hDbgfTraceEvtSrc == NIL_DBGFTRACEREVTSRC ? &g_pdmR0DevHlp : &g_pdmR0DevHlpTracing; 303 #else 287 304 pDevIns->pHlpR0 = &g_pdmR0DevHlp; 305 #endif 288 306 pDevIns->pvInstanceDataR0 = (uint8_t *)pDevIns + cbRing0 + cbRing3 + cbRC; 289 307 pDevIns->pvInstanceDataForR0 = &pDevIns->achInstanceData[0]; … … 314 332 pDevIns->Internal.s.pInsR3R0 = pDevInsR3; 315 333 pDevIns->Internal.s.pIntR3R0 = &pDevInsR3->Internal.s; 334 pDevIns->Internal.s.hDbgfTraceEvtSrc = hDbgfTraceEvtSrc; 316 335 317 336 /* … … 342 361 pDevInsR3->Internal.s.fIntFlags = RCPtrMapping == NIL_RTRGPTR ? PDMDEVINSINT_FLAGS_R0_ENABLED 343 362 : PDMDEVINSINT_FLAGS_R0_ENABLED | PDMDEVINSINT_FLAGS_RC_ENABLED; 363 pDevInsR3->Internal.s.hDbgfTraceEvtSrc = hDbgfTraceEvtSrc; 344 364 345 365 /* … … 369 389 370 390 /* 371 * Add to the device instance array and set its handle value. 391 * If the device is being traced we have to set up a single page for tracking 392 * I/O and MMIO region registrations so we can inject our own handlers. 372 393 */ 373 AssertCompile(sizeof(pGVM->pdmr0.padding) == sizeof(pGVM->pdmr0)); 374 uint32_t idxR0Device = pGVM->pdmr0.s.cDevInstances; 375 if (idxR0Device < RT_ELEMENTS(pGVM->pdmr0.s.apDevInstances)) 394 if (hDbgfTraceEvtSrc != NIL_DBGFTRACEREVTSRC) 376 395 { 377 pGVM->pdmr0.s.apDevInstances[idxR0Device] = pDevIns; 378 pGVM->pdmr0.s.cDevInstances = idxR0Device + 1; 379 pDevIns->Internal.s.idxR0Device = idxR0Device; 380 pDevInsR3->Internal.s.idxR0Device = idxR0Device; 381 382 /* 383 * Call the early constructor if present. 384 */ 385 if (pDevReg->pfnEarlyConstruct) 386 rc = pDevReg->pfnEarlyConstruct(pDevIns); 396 pDevIns->Internal.s.hDbgfTraceObj = NIL_RTR0MEMOBJ; 397 rc = RTR0MemObjAllocPage(&pDevIns->Internal.s.hDbgfTraceObj, PDM_MAX_DEVICE_DBGF_TRACING_TRACK, false /*fExecutable*/); 387 398 if (RT_SUCCESS(rc)) 388 399 { 400 pDevIns->Internal.s.paDbgfTraceTrack = (PPDMDEVINSDBGFTRACK)RTR0MemObjAddress(pDevIns->Internal.s.hDbgfTraceObj); 401 pDevIns->Internal.s.idxDbgfTraceTrackNext = 0; 402 pDevIns->Internal.s.cDbgfTraceTrackMax = PDM_MAX_DEVICE_DBGF_TRACING_TRACK / sizeof(PDMDEVINSDBGFTRACK); 403 RT_BZERO(pDevIns->Internal.s.paDbgfTraceTrack, PDM_MAX_DEVICE_DBGF_TRACING_TRACK); 404 } 405 } 406 407 if (RT_SUCCESS(rc)) 408 { 409 /* 410 * Add to the device instance array and set its handle value. 411 */ 412 AssertCompile(sizeof(pGVM->pdmr0.padding) == sizeof(pGVM->pdmr0)); 413 uint32_t idxR0Device = pGVM->pdmr0.s.cDevInstances; 414 if (idxR0Device < RT_ELEMENTS(pGVM->pdmr0.s.apDevInstances)) 415 { 416 pGVM->pdmr0.s.apDevInstances[idxR0Device] = pDevIns; 417 pGVM->pdmr0.s.cDevInstances = idxR0Device + 1; 418 pDevIns->Internal.s.idxR0Device = idxR0Device; 419 pDevInsR3->Internal.s.idxR0Device = idxR0Device; 420 389 421 /* 390 * We're done.422 * Call the early constructor if present. 391 423 */ 392 *ppDevInsR3 = RTR0MemObjAddressR3(hMapObj); 393 return rc; 424 if (pDevReg->pfnEarlyConstruct) 425 rc = pDevReg->pfnEarlyConstruct(pDevIns); 426 if (RT_SUCCESS(rc)) 427 { 428 /* 429 * We're done. 430 */ 431 *ppDevInsR3 = RTR0MemObjAddressR3(hMapObj); 432 return rc; 433 } 434 435 /* 436 * Bail out. 437 */ 438 if (pDevIns->pReg->pfnFinalDestruct) 439 pDevIns->pReg->pfnFinalDestruct(pDevIns); 440 441 pGVM->pdmr0.s.apDevInstances[idxR0Device] = NULL; 442 Assert(pGVM->pdmr0.s.cDevInstances == idxR0Device + 1); 443 pGVM->pdmr0.s.cDevInstances = idxR0Device; 394 444 } 395 396 /*397 * Bail out.398 */399 if (pDevIns->pReg->pfnFinalDestruct)400 pDevIns->pReg->pfnFinalDestruct(pDevIns);401 402 pGVM->pdmr0.s.apDevInstances[idxR0Device] = NULL;403 Assert(pGVM->pdmr0.s.cDevInstances == idxR0Device + 1);404 pGVM->pdmr0.s.cDevInstances = idxR0Device;405 445 } 446 447 if ( hDbgfTraceEvtSrc != NIL_DBGFTRACEREVTSRC 448 && pDevIns->Internal.s.hDbgfTraceObj != NIL_RTR0MEMOBJ) 449 RTR0MemObjFree(pDevIns->Internal.s.hDbgfTraceObj, true); 406 450 407 451 RTR0MemObjFree(hMapObj, true); … … 515 559 { 516 560 rc = pdmR0DeviceCreateWorker(pGVM, pDevReg, pReq->iInstance, pReq->cbInstanceR3, pReq->cbInstanceRC, 517 NIL_RTRCPTR /** @todo new raw-mode */, hMod, &pReq->pDevInsR3); 561 NIL_RTRCPTR /** @todo new raw-mode */, pReq->hDbgfTracerEvtSrc, 562 hMod, &pReq->pDevInsR3); 518 563 if (RT_SUCCESS(rc)) 519 564 hMod = NULL; /* keep the module reference */ -
trunk/src/VBox/VMM/VMMR3/PDM.cpp
r82968 r84459 832 832 } 833 833 834 if (pDevIns->Internal.s.paDbgfTraceTrack) 835 { 836 RTMemFree(pDevIns->Internal.s.paDbgfTraceTrack); 837 pDevIns->Internal.s.paDbgfTraceTrack = NULL; 838 } 839 834 840 TMR3TimerDestroyDevice(pVM, pDevIns); 835 841 SSMR3DeregisterDevice(pVM, pDevIns, NULL, 0); -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r84431 r84459 4329 4329 4330 4330 4331 #ifdef VBOX_WITH_DBGF_TRACING 4332 /** 4333 * The device helper structure for trusted devices - tracing variant. 4334 */ 4335 const PDMDEVHLPR3 g_pdmR3DevHlpTracing = 4336 { 4337 PDM_DEVHLPR3_VERSION, 4338 pdmR3DevHlpTracing_IoPortCreateEx, 4339 pdmR3DevHlpTracing_IoPortMap, 4340 pdmR3DevHlpTracing_IoPortUnmap, 4341 pdmR3DevHlp_IoPortGetMappingAddress, 4342 pdmR3DevHlpTracing_MmioCreateEx, 4343 pdmR3DevHlpTracing_MmioMap, 4344 pdmR3DevHlpTracing_MmioUnmap, 4345 pdmR3DevHlp_MmioReduce, 4346 pdmR3DevHlp_MmioGetMappingAddress, 4347 pdmR3DevHlp_Mmio2Create, 4348 pdmR3DevHlp_Mmio2Destroy, 4349 pdmR3DevHlp_Mmio2Map, 4350 pdmR3DevHlp_Mmio2Unmap, 4351 pdmR3DevHlp_Mmio2Reduce, 4352 pdmR3DevHlp_Mmio2GetMappingAddress, 4353 pdmR3DevHlp_Mmio2ChangeRegionNo, 4354 pdmR3DevHlp_ROMRegister, 4355 pdmR3DevHlp_ROMProtectShadow, 4356 pdmR3DevHlp_SSMRegister, 4357 SSMR3PutStruct, 4358 SSMR3PutStructEx, 4359 SSMR3PutBool, 4360 SSMR3PutU8, 4361 SSMR3PutS8, 4362 SSMR3PutU16, 4363 SSMR3PutS16, 4364 SSMR3PutU32, 4365 SSMR3PutS32, 4366 SSMR3PutU64, 4367 SSMR3PutS64, 4368 SSMR3PutU128, 4369 SSMR3PutS128, 4370 SSMR3PutUInt, 4371 SSMR3PutSInt, 4372 SSMR3PutGCUInt, 4373 SSMR3PutGCUIntReg, 4374 SSMR3PutGCPhys32, 4375 SSMR3PutGCPhys64, 4376 SSMR3PutGCPhys, 4377 SSMR3PutGCPtr, 4378 SSMR3PutGCUIntPtr, 4379 SSMR3PutRCPtr, 4380 SSMR3PutIOPort, 4381 SSMR3PutSel, 4382 SSMR3PutMem, 4383 SSMR3PutStrZ, 4384 SSMR3GetStruct, 4385 SSMR3GetStructEx, 4386 SSMR3GetBool, 4387 SSMR3GetBoolV, 4388 SSMR3GetU8, 4389 SSMR3GetU8V, 4390 SSMR3GetS8, 4391 SSMR3GetS8V, 4392 SSMR3GetU16, 4393 SSMR3GetU16V, 4394 SSMR3GetS16, 4395 SSMR3GetS16V, 4396 SSMR3GetU32, 4397 SSMR3GetU32V, 4398 SSMR3GetS32, 4399 SSMR3GetS32V, 4400 SSMR3GetU64, 4401 SSMR3GetU64V, 4402 SSMR3GetS64, 4403 SSMR3GetS64V, 4404 SSMR3GetU128, 4405 SSMR3GetU128V, 4406 SSMR3GetS128, 4407 SSMR3GetS128V, 4408 SSMR3GetGCPhys32, 4409 SSMR3GetGCPhys32V, 4410 SSMR3GetGCPhys64, 4411 SSMR3GetGCPhys64V, 4412 SSMR3GetGCPhys, 4413 SSMR3GetGCPhysV, 4414 SSMR3GetUInt, 4415 SSMR3GetSInt, 4416 SSMR3GetGCUInt, 4417 SSMR3GetGCUIntReg, 4418 SSMR3GetGCPtr, 4419 SSMR3GetGCUIntPtr, 4420 SSMR3GetRCPtr, 4421 SSMR3GetIOPort, 4422 SSMR3GetSel, 4423 SSMR3GetMem, 4424 SSMR3GetStrZ, 4425 SSMR3GetStrZEx, 4426 SSMR3Skip, 4427 SSMR3SkipToEndOfUnit, 4428 SSMR3SetLoadError, 4429 SSMR3SetLoadErrorV, 4430 SSMR3SetCfgError, 4431 SSMR3SetCfgErrorV, 4432 SSMR3HandleGetStatus, 4433 SSMR3HandleGetAfter, 4434 SSMR3HandleIsLiveSave, 4435 SSMR3HandleMaxDowntime, 4436 SSMR3HandleHostBits, 4437 SSMR3HandleRevision, 4438 SSMR3HandleVersion, 4439 SSMR3HandleHostOSAndArch, 4440 pdmR3DevHlp_TMTimerCreate, 4441 pdmR3DevHlp_TimerCreate, 4442 pdmR3DevHlp_TimerToPtr, 4443 pdmR3DevHlp_TimerFromMicro, 4444 pdmR3DevHlp_TimerFromMilli, 4445 pdmR3DevHlp_TimerFromNano, 4446 pdmR3DevHlp_TimerGet, 4447 pdmR3DevHlp_TimerGetFreq, 4448 pdmR3DevHlp_TimerGetNano, 4449 pdmR3DevHlp_TimerIsActive, 4450 pdmR3DevHlp_TimerIsLockOwner, 4451 pdmR3DevHlp_TimerLockClock, 4452 pdmR3DevHlp_TimerLockClock2, 4453 pdmR3DevHlp_TimerSet, 4454 pdmR3DevHlp_TimerSetFrequencyHint, 4455 pdmR3DevHlp_TimerSetMicro, 4456 pdmR3DevHlp_TimerSetMillies, 4457 pdmR3DevHlp_TimerSetNano, 4458 pdmR3DevHlp_TimerSetRelative, 4459 pdmR3DevHlp_TimerStop, 4460 pdmR3DevHlp_TimerUnlockClock, 4461 pdmR3DevHlp_TimerUnlockClock2, 4462 pdmR3DevHlp_TimerSetCritSect, 4463 pdmR3DevHlp_TimerSave, 4464 pdmR3DevHlp_TimerLoad, 4465 pdmR3DevHlp_TimerDestroy, 4466 TMR3TimerSkip, 4467 pdmR3DevHlp_TMUtcNow, 4468 CFGMR3Exists, 4469 CFGMR3QueryType, 4470 CFGMR3QuerySize, 4471 CFGMR3QueryInteger, 4472 CFGMR3QueryIntegerDef, 4473 CFGMR3QueryString, 4474 CFGMR3QueryStringDef, 4475 CFGMR3QueryBytes, 4476 CFGMR3QueryU64, 4477 CFGMR3QueryU64Def, 4478 CFGMR3QueryS64, 4479 CFGMR3QueryS64Def, 4480 CFGMR3QueryU32, 4481 CFGMR3QueryU32Def, 4482 CFGMR3QueryS32, 4483 CFGMR3QueryS32Def, 4484 CFGMR3QueryU16, 4485 CFGMR3QueryU16Def, 4486 CFGMR3QueryS16, 4487 CFGMR3QueryS16Def, 4488 CFGMR3QueryU8, 4489 CFGMR3QueryU8Def, 4490 CFGMR3QueryS8, 4491 CFGMR3QueryS8Def, 4492 CFGMR3QueryBool, 4493 CFGMR3QueryBoolDef, 4494 CFGMR3QueryPort, 4495 CFGMR3QueryPortDef, 4496 CFGMR3QueryUInt, 4497 CFGMR3QueryUIntDef, 4498 CFGMR3QuerySInt, 4499 CFGMR3QuerySIntDef, 4500 CFGMR3QueryPtr, 4501 CFGMR3QueryPtrDef, 4502 CFGMR3QueryGCPtr, 4503 CFGMR3QueryGCPtrDef, 4504 CFGMR3QueryGCPtrU, 4505 CFGMR3QueryGCPtrUDef, 4506 CFGMR3QueryGCPtrS, 4507 CFGMR3QueryGCPtrSDef, 4508 CFGMR3QueryStringAlloc, 4509 CFGMR3QueryStringAllocDef, 4510 CFGMR3GetParent, 4511 CFGMR3GetChild, 4512 CFGMR3GetChildF, 4513 CFGMR3GetChildFV, 4514 CFGMR3GetFirstChild, 4515 CFGMR3GetNextChild, 4516 CFGMR3GetName, 4517 CFGMR3GetNameLen, 4518 CFGMR3AreChildrenValid, 4519 CFGMR3GetFirstValue, 4520 CFGMR3GetNextValue, 4521 CFGMR3GetValueName, 4522 CFGMR3GetValueNameLen, 4523 CFGMR3GetValueType, 4524 CFGMR3AreValuesValid, 4525 CFGMR3ValidateConfig, 4526 pdmR3DevHlpTracing_PhysRead, 4527 pdmR3DevHlpTracing_PhysWrite, 4528 pdmR3DevHlp_PhysGCPhys2CCPtr, 4529 pdmR3DevHlp_PhysGCPhys2CCPtrReadOnly, 4530 pdmR3DevHlp_PhysReleasePageMappingLock, 4531 pdmR3DevHlp_PhysReadGCVirt, 4532 pdmR3DevHlp_PhysWriteGCVirt, 4533 pdmR3DevHlp_PhysGCPtr2GCPhys, 4534 pdmR3DevHlp_MMHeapAlloc, 4535 pdmR3DevHlp_MMHeapAllocZ, 4536 pdmR3DevHlp_MMHeapFree, 4537 pdmR3DevHlp_VMState, 4538 pdmR3DevHlp_VMTeleportedAndNotFullyResumedYet, 4539 pdmR3DevHlp_VMSetError, 4540 pdmR3DevHlp_VMSetErrorV, 4541 pdmR3DevHlp_VMSetRuntimeError, 4542 pdmR3DevHlp_VMSetRuntimeErrorV, 4543 pdmR3DevHlp_DBGFStopV, 4544 pdmR3DevHlp_DBGFInfoRegister, 4545 pdmR3DevHlp_DBGFInfoRegisterArgv, 4546 pdmR3DevHlp_DBGFRegRegister, 4547 pdmR3DevHlp_DBGFTraceBuf, 4548 pdmR3DevHlp_STAMRegister, 4549 pdmR3DevHlp_STAMRegisterV, 4550 pdmR3DevHlp_PCIRegister, 4551 pdmR3DevHlp_PCIRegisterMsi, 4552 pdmR3DevHlp_PCIIORegionRegister, 4553 pdmR3DevHlp_PCIInterceptConfigAccesses, 4554 pdmR3DevHlp_PCIConfigWrite, 4555 pdmR3DevHlp_PCIConfigRead, 4556 pdmR3DevHlpTracing_PCIPhysRead, 4557 pdmR3DevHlpTracing_PCIPhysWrite, 4558 pdmR3DevHlpTracing_PCISetIrq, 4559 pdmR3DevHlpTracing_PCISetIrqNoWait, 4560 pdmR3DevHlpTracing_ISASetIrq, 4561 pdmR3DevHlpTracing_ISASetIrqNoWait, 4562 pdmR3DevHlpTracing_IoApicSendMsi, 4563 pdmR3DevHlp_DriverAttach, 4564 pdmR3DevHlp_DriverDetach, 4565 pdmR3DevHlp_DriverReconfigure, 4566 pdmR3DevHlp_QueueCreatePtr, 4567 pdmR3DevHlp_QueueCreate, 4568 pdmR3DevHlp_QueueToPtr, 4569 pdmR3DevHlp_QueueAlloc, 4570 pdmR3DevHlp_QueueInsert, 4571 pdmR3DevHlp_QueueInsertEx, 4572 pdmR3DevHlp_QueueFlushIfNecessary, 4573 pdmR3DevHlp_TaskCreate, 4574 pdmR3DevHlp_TaskTrigger, 4575 pdmR3DevHlp_SUPSemEventCreate, 4576 pdmR3DevHlp_SUPSemEventClose, 4577 pdmR3DevHlp_SUPSemEventSignal, 4578 pdmR3DevHlp_SUPSemEventWaitNoResume, 4579 pdmR3DevHlp_SUPSemEventWaitNsAbsIntr, 4580 pdmR3DevHlp_SUPSemEventWaitNsRelIntr, 4581 pdmR3DevHlp_SUPSemEventGetResolution, 4582 pdmR3DevHlp_SUPSemEventMultiCreate, 4583 pdmR3DevHlp_SUPSemEventMultiClose, 4584 pdmR3DevHlp_SUPSemEventMultiSignal, 4585 pdmR3DevHlp_SUPSemEventMultiReset, 4586 pdmR3DevHlp_SUPSemEventMultiWaitNoResume, 4587 pdmR3DevHlp_SUPSemEventMultiWaitNsAbsIntr, 4588 pdmR3DevHlp_SUPSemEventMultiWaitNsRelIntr, 4589 pdmR3DevHlp_SUPSemEventMultiGetResolution, 4590 pdmR3DevHlp_CritSectInit, 4591 pdmR3DevHlp_CritSectGetNop, 4592 pdmR3DevHlp_CritSectGetNopR0, 4593 pdmR3DevHlp_CritSectGetNopRC, 4594 pdmR3DevHlp_SetDeviceCritSect, 4595 pdmR3DevHlp_CritSectYield, 4596 pdmR3DevHlp_CritSectEnter, 4597 pdmR3DevHlp_CritSectEnterDebug, 4598 pdmR3DevHlp_CritSectTryEnter, 4599 pdmR3DevHlp_CritSectTryEnterDebug, 4600 pdmR3DevHlp_CritSectLeave, 4601 pdmR3DevHlp_CritSectIsOwner, 4602 pdmR3DevHlp_CritSectIsInitialized, 4603 pdmR3DevHlp_CritSectHasWaiters, 4604 pdmR3DevHlp_CritSectGetRecursion, 4605 pdmR3DevHlp_CritSectScheduleExitEvent, 4606 pdmR3DevHlp_CritSectDelete, 4607 pdmR3DevHlp_ThreadCreate, 4608 PDMR3ThreadDestroy, 4609 PDMR3ThreadIAmSuspending, 4610 PDMR3ThreadIAmRunning, 4611 PDMR3ThreadSleep, 4612 PDMR3ThreadSuspend, 4613 PDMR3ThreadResume, 4614 pdmR3DevHlp_SetAsyncNotification, 4615 pdmR3DevHlp_AsyncNotificationCompleted, 4616 pdmR3DevHlp_RTCRegister, 4617 pdmR3DevHlp_PCIBusRegister, 4618 pdmR3DevHlp_IommuRegister, 4619 pdmR3DevHlp_PICRegister, 4620 pdmR3DevHlp_ApicRegister, 4621 pdmR3DevHlp_IoApicRegister, 4622 pdmR3DevHlp_HpetRegister, 4623 pdmR3DevHlp_PciRawRegister, 4624 pdmR3DevHlp_DMACRegister, 4625 pdmR3DevHlp_DMARegister, 4626 pdmR3DevHlp_DMAReadMemory, 4627 pdmR3DevHlp_DMAWriteMemory, 4628 pdmR3DevHlp_DMASetDREQ, 4629 pdmR3DevHlp_DMAGetChannelMode, 4630 pdmR3DevHlp_DMASchedule, 4631 pdmR3DevHlp_CMOSWrite, 4632 pdmR3DevHlp_CMOSRead, 4633 pdmR3DevHlp_AssertEMT, 4634 pdmR3DevHlp_AssertOther, 4635 pdmR3DevHlp_LdrGetRCInterfaceSymbols, 4636 pdmR3DevHlp_LdrGetR0InterfaceSymbols, 4637 pdmR3DevHlp_CallR0, 4638 pdmR3DevHlp_VMGetSuspendReason, 4639 pdmR3DevHlp_VMGetResumeReason, 4640 pdmR3DevHlp_PhysBulkGCPhys2CCPtr, 4641 pdmR3DevHlp_PhysBulkGCPhys2CCPtrReadOnly, 4642 pdmR3DevHlp_PhysBulkReleasePageMappingLocks, 4643 pdmR3DevHlp_CpuGetGuestMicroarch, 4644 0, 4645 0, 4646 0, 4647 0, 4648 0, 4649 0, 4650 0, 4651 0, 4652 0, 4653 0, 4654 pdmR3DevHlp_GetUVM, 4655 pdmR3DevHlp_GetVM, 4656 pdmR3DevHlp_GetVMCPU, 4657 pdmR3DevHlp_GetCurrentCpuId, 4658 pdmR3DevHlp_RegisterVMMDevHeap, 4659 pdmR3DevHlp_FirmwareRegister, 4660 pdmR3DevHlp_VMReset, 4661 pdmR3DevHlp_VMSuspend, 4662 pdmR3DevHlp_VMSuspendSaveAndPowerOff, 4663 pdmR3DevHlp_VMPowerOff, 4664 pdmR3DevHlp_A20IsEnabled, 4665 pdmR3DevHlp_A20Set, 4666 pdmR3DevHlp_GetCpuId, 4667 pdmR3DevHlp_TMTimeVirtGet, 4668 pdmR3DevHlp_TMTimeVirtGetFreq, 4669 pdmR3DevHlp_TMTimeVirtGetNano, 4670 pdmR3DevHlp_GetSupDrvSession, 4671 pdmR3DevHlp_QueryGenericUserObject, 4672 pdmR3DevHlp_PGMHandlerPhysicalTypeRegister, 4673 PDM_DEVHLPR3_VERSION /* the end */ 4674 }; 4675 #endif 4676 4677 4331 4678 4332 4679 -
trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp
r82968 r84459 308 308 } 309 309 310 #ifdef VBOX_WITH_DBGF_TRACING 311 DBGFTRACEREVTSRC hDbgfTraceEvtSrc = NIL_DBGFTRACEREVTSRC; 312 bool fTracingEnabled = false; 313 bool fGCPhysRwAll = false; 314 rc = CFGMR3QueryBoolDef(paDevs[i].pNode, "TracingEnabled", &fTracingEnabled, 315 false); 316 AssertLogRelRCReturn(rc, rc); 317 if (fTracingEnabled) 318 { 319 rc = CFGMR3QueryBoolDef(paDevs[i].pNode, "TraceAllGstMemRw", &fGCPhysRwAll, 320 false); 321 AssertLogRelRCReturn(rc, rc); 322 323 /* Traced devices need to be trusted for now. */ 324 if (fTrusted) 325 { 326 rc = DBGFR3TracerRegisterEvtSrc(pVM, pReg->szName, &hDbgfTraceEvtSrc); 327 AssertLogRelRCReturn(rc, rc); 328 } 329 else 330 AssertMsgFailedReturn(("configuration error: Device tracing needs a trusted device\n"), VERR_INCOMPATIBLE_CONFIG); 331 } 332 #endif 333 310 334 /* config node */ 311 335 PCFGMNODE pConfigNode = CFGMR3GetChild(paDevs[i].pNode, "Config"); … … 338 362 339 363 PDMDEVICECREATEREQ Req; 340 Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 341 Req.Hdr.cbReq = sizeof(Req); 342 Req.pDevInsR3 = NULL; 343 Req.fFlags = pReg->fFlags; 344 Req.fClass = pReg->fClass; 345 Req.cMaxInstances = pReg->cMaxInstances; 346 Req.uSharedVersion = pReg->uSharedVersion; 347 Req.cbInstanceShared = pReg->cbInstanceShared; 348 Req.cbInstanceR3 = pReg->cbInstanceCC; 349 Req.cbInstanceRC = pReg->cbInstanceRC; 350 Req.cMaxPciDevices = pReg->cMaxPciDevices; 351 Req.cMaxMsixVectors = pReg->cMaxMsixVectors; 352 Req.iInstance = paDevs[i].iInstance; 353 Req.fRCEnabled = fRCEnabled; 354 Req.afReserved[0] = false; 355 Req.afReserved[1] = false; 356 Req.afReserved[2] = false; 364 Req.Hdr.u32Magic = SUPVMMR0REQHDR_MAGIC; 365 Req.Hdr.cbReq = sizeof(Req); 366 Req.pDevInsR3 = NULL; 367 /** @todo Add tracer id in request so R0 can set up DEVINSR0 properly. */ 368 Req.fFlags = pReg->fFlags; 369 Req.fClass = pReg->fClass; 370 Req.cMaxInstances = pReg->cMaxInstances; 371 Req.uSharedVersion = pReg->uSharedVersion; 372 Req.cbInstanceShared = pReg->cbInstanceShared; 373 Req.cbInstanceR3 = pReg->cbInstanceCC; 374 Req.cbInstanceRC = pReg->cbInstanceRC; 375 Req.cMaxPciDevices = pReg->cMaxPciDevices; 376 Req.cMaxMsixVectors = pReg->cMaxMsixVectors; 377 Req.iInstance = paDevs[i].iInstance; 378 Req.fRCEnabled = fRCEnabled; 379 Req.afReserved[0] = false; 380 Req.afReserved[1] = false; 381 Req.afReserved[2] = false; 382 #ifdef VBOX_WITH_DBGF_TRACING 383 Req.hDbgfTracerEvtSrc = hDbgfTraceEvtSrc; 384 #else 385 Req.hDbgfTracerEvtSrc = NIL_DBGFTRACEREVTSRC; 386 #endif 357 387 rc = RTStrCopy(Req.szDevName, sizeof(Req.szDevName), pReg->szName); 358 388 AssertLogRelRCReturn(rc, rc); … … 429 459 pDevIns->Internal.s.pCfgHandle = paDevs[i].pNode; 430 460 pDevIns->Internal.s.pVMR3 = pVM; 461 #ifdef VBOX_WITH_DBGF_TRACING 462 pDevIns->Internal.s.hDbgfTraceEvtSrc = hDbgfTraceEvtSrc; 463 #else 464 pDevIns->Internal.s.hDbgfTraceEvtSrc = NIL_DBGFTRACEREVTSRC; 465 #endif 431 466 //pDevIns->Internal.s.pHeadPciDevR3 = NULL; 432 467 pDevIns->Internal.s.fIntFlags |= PDMDEVINSINT_FLAGS_SUSPENDED; … … 479 514 return rc == VERR_VERSION_MISMATCH ? VERR_PDM_DEVICE_VERSION_MISMATCH : rc; 480 515 } 516 517 #ifdef VBOX_WITH_DBGF_TRACING 518 /* 519 * Allocate memory for the MMIO/IO port registration tracking if DBGF tracing is enabled. 520 */ 521 if (hDbgfTraceEvtSrc != NIL_DBGFTRACEREVTSRC) 522 { 523 pDevIns->Internal.s.paDbgfTraceTrack = (PPDMDEVINSDBGFTRACK)RTMemAllocZ(PDM_MAX_DEVICE_DBGF_TRACING_TRACK); 524 if (!pDevIns->Internal.s.paDbgfTraceTrack) 525 { 526 LogRel(("PDM: Failed to construct '%s'/%d! %Rra\n", pDevIns->pReg->szName, pDevIns->iInstance, VERR_NO_MEMORY)); 527 if (VMR3GetErrorCount(pVM->pUVM) == 0) 528 VMSetError(pVM, rc, RT_SRC_POS, "Failed to construct device '%s' instance #%u", 529 pDevIns->pReg->szName, pDevIns->iInstance); 530 paDevs[i].pDev->cInstances--; 531 return VERR_NO_MEMORY; 532 } 533 534 pDevIns->Internal.s.idxDbgfTraceTrackNext = 0; 535 pDevIns->Internal.s.cDbgfTraceTrackMax = PDM_MAX_DEVICE_DBGF_TRACING_TRACK / sizeof(PDMDEVINSDBGFTRACK); 536 pDevIns->pHlpR3 = &g_pdmR3DevHlpTracing; 537 } 538 #endif 481 539 482 540 /* -
trunk/src/VBox/VMM/include/PDMInternal.h
r84431 r84459 27 27 #include <VBox/vmm/stam.h> 28 28 #include <VBox/vusb.h> 29 #include <VBox/vmm/iom.h> 29 30 #include <VBox/vmm/pdmasynccompletion.h> 30 31 #ifdef VBOX_WITH_NETSHAPER … … 75 76 76 77 /** The maximum device instance (total) size, ring-0/raw-mode capable devices. */ 77 #define PDM_MAX_DEVICE_INSTANCE_SIZE _4M78 #define PDM_MAX_DEVICE_INSTANCE_SIZE _4M 78 79 /** The maximum device instance (total) size, ring-3 only devices. */ 79 #define PDM_MAX_DEVICE_INSTANCE_SIZE_R3 _8M 80 #define PDM_MAX_DEVICE_INSTANCE_SIZE_R3 _8M 81 /** The maximum size for the DBGF tracing tracking structure allocated for each device. */ 82 #define PDM_MAX_DEVICE_DBGF_TRACING_TRACK PAGE_SIZE 80 83 81 84 … … 129 132 PDMASYNCCOMPLETIONEPCLASSTYPE_32BIT_HACK = 0x7fffffff 130 133 } PDMASYNCCOMPLETIONEPCLASSTYPE; 134 135 136 /** 137 * MMIO/IO port registration tracking structure for DBGF tracing. 138 */ 139 typedef struct PDMDEVINSDBGFTRACK 140 { 141 /** Flag whether this tracks a IO port or MMIO registration. */ 142 bool fMmio; 143 /** Opaque user data passed during registration. */ 144 void *pvUser; 145 /** Type dependent data. */ 146 union 147 { 148 /** I/O port registration. */ 149 struct 150 { 151 /** IOM I/O port handle. */ 152 IOMIOPORTHANDLE hIoPorts; 153 /** Original OUT handler of the device. */ 154 PFNIOMIOPORTNEWOUT pfnOut; 155 /** Original IN handler of the device. */ 156 PFNIOMIOPORTNEWIN pfnIn; 157 /** Original string OUT handler of the device. */ 158 PFNIOMIOPORTNEWOUTSTRING pfnOutStr; 159 /** Original string IN handler of the device. */ 160 PFNIOMIOPORTNEWINSTRING pfnInStr; 161 } IoPort; 162 /** MMIO registration. */ 163 struct 164 { 165 /** IOM MMIO region handle. */ 166 IOMMMIOHANDLE hMmioRegion; 167 /** Original MMIO write handler of the device. */ 168 PFNIOMMMIONEWWRITE pfnWrite; 169 /** Original MMIO read handler of the device. */ 170 PFNIOMMMIONEWREAD pfnRead; 171 /** Original MMIO fill handler of the device. */ 172 PFNIOMMMIONEWFILL pfnFill; 173 } Mmio; 174 } u; 175 } PDMDEVINSDBGFTRACK; 176 /** Pointer to a MMIO/IO port registration tracking structure. */ 177 typedef PDMDEVINSDBGFTRACK *PPDMDEVINSDBGFTRACK; 178 /** Pointer to a const MMIO/IO port registration tracking structure. */ 179 typedef const PDMDEVINSDBGFTRACK *PCPDMDEVINSDBGFTRACK; 180 131 181 132 182 /** … … 153 203 /** R3 pointer to the VM this instance was created for. */ 154 204 PVMR3 pVMR3; 205 /** DBGF trace event source handle if tracing is configured. */ 206 DBGFTRACEREVTSRC hDbgfTraceEvtSrc; 207 /** Pointer to the base of the page containing the DBGF tracing tracking structures. */ 208 PPDMDEVINSDBGFTRACK paDbgfTraceTrack; 209 /** Index of the next entry to use for tracking. */ 210 uint32_t idxDbgfTraceTrackNext; 211 /** Maximum number of records fitting into the single page. */ 212 uint32_t cDbgfTraceTrackMax; 155 213 156 214 /** Flags, see PDMDEVINSINT_FLAGS_XXX. */ … … 178 236 /** Pointer to the ring-0 mapping of the ring-3 instance (for idTracing). */ 179 237 R0PTRTYPE(struct PDMDEVINSR3 *) pInsR3R0; 238 /** DBGF trace event source handle if tracing is configured. */ 239 DBGFTRACEREVTSRC hDbgfTraceEvtSrc; 180 240 /** The device instance memory. */ 181 241 RTR0MEMOBJ hMemObj; 182 242 /** The ring-3 mapping object. */ 183 243 RTR0MEMOBJ hMapObj; 244 /** The page memory object for tracking MMIO and I/O port registrations when tracing is configured. */ 245 RTR0MEMOBJ hDbgfTraceObj; 246 /** Pointer to the base of the page containing the DBGF tracing tracking structures. */ 247 PPDMDEVINSDBGFTRACK paDbgfTraceTrack; 248 /** Index of the next entry to use for tracking. */ 249 uint32_t idxDbgfTraceTrackNext; 250 /** Maximum number of records fitting into the single page. */ 251 uint32_t cDbgfTraceTrackMax; 184 252 /** Index into PDMR0PERVM::apDevInstances. */ 185 253 uint32_t idxR0Device; … … 1448 1516 extern const PDMDRVHLPR3 g_pdmR3DrvHlp; 1449 1517 extern const PDMDEVHLPR3 g_pdmR3DevHlpTrusted; 1518 # ifdef VBOX_WITH_DBGF_TRACING 1519 extern const PDMDEVHLPR3 g_pdmR3DevHlpTracing; 1520 # endif 1450 1521 extern const PDMDEVHLPR3 g_pdmR3DevHlpUnTrusted; 1451 1522 extern const PDMPICHLP g_pdmR3DevPicHlp; … … 1591 1662 #endif 1592 1663 1664 #if defined IN_RING0 1665 DECLHIDDEN(bool) pdmR0IsaSetIrq(PGVM pGVM, int iIrq, int iLevel, uint32_t uTagSrc); 1666 #endif 1667 1668 #ifdef VBOX_WITH_DBGF_TRACING 1669 # if defined(IN_RING3) 1670 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_IoPortCreateEx(PPDMDEVINS pDevIns, RTIOPORT cPorts, uint32_t fFlags, PPDMPCIDEV pPciDev, 1671 uint32_t iPciRegion, PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 1672 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, RTR3PTR pvUser, 1673 const char *pszDesc, PCIOMIOPORTDESC paExtDescs, PIOMIOPORTHANDLE phIoPorts); 1674 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_IoPortMap(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, RTIOPORT Port); 1675 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_IoPortUnmap(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts); 1676 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_MmioCreateEx(PPDMDEVINS pDevIns, RTGCPHYS cbRegion, 1677 uint32_t fFlags, PPDMPCIDEV pPciDev, uint32_t iPciRegion, 1678 PFNIOMMMIONEWWRITE pfnWrite, PFNIOMMMIONEWREAD pfnRead, PFNIOMMMIONEWFILL pfnFill, 1679 void *pvUser, const char *pszDesc, PIOMMMIOHANDLE phRegion); 1680 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_MmioMap(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, RTGCPHYS GCPhys); 1681 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_MmioUnmap(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion); 1682 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_PhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead, uint32_t fFlags); 1683 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_PhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite, uint32_t fFlags); 1684 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_PCIPhysRead(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead, uint32_t fFlags); 1685 DECLHIDDEN(DECLCALLBACK(int)) pdmR3DevHlpTracing_PCIPhysWrite(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite, uint32_t fFlags); 1686 DECLHIDDEN(DECLCALLBACK(void)) pdmR3DevHlpTracing_PCISetIrq(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel); 1687 DECLHIDDEN(DECLCALLBACK(void)) pdmR3DevHlpTracing_PCISetIrqNoWait(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel); 1688 DECLHIDDEN(DECLCALLBACK(void)) pdmR3DevHlpTracing_ISASetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel); 1689 DECLHIDDEN(DECLCALLBACK(void)) pdmR3DevHlpTracing_ISASetIrqNoWait(PPDMDEVINS pDevIns, int iIrq, int iLevel); 1690 DECLHIDDEN(DECLCALLBACK(void)) pdmR3DevHlpTracing_IoApicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue); 1691 # elif defined(IN_RING0) 1692 DECLHIDDEN(DECLCALLBACK(int)) pdmR0DevHlpTracing_IoPortSetUpContextEx(PPDMDEVINS pDevIns, IOMIOPORTHANDLE hIoPorts, 1693 PFNIOMIOPORTNEWOUT pfnOut, PFNIOMIOPORTNEWIN pfnIn, 1694 PFNIOMIOPORTNEWOUTSTRING pfnOutStr, PFNIOMIOPORTNEWINSTRING pfnInStr, 1695 void *pvUser); 1696 DECLHIDDEN(DECLCALLBACK(int)) pdmR0DevHlpTracing_MmioSetUpContextEx(PPDMDEVINS pDevIns, IOMMMIOHANDLE hRegion, PFNIOMMMIONEWWRITE pfnWrite, 1697 PFNIOMMMIONEWREAD pfnRead, PFNIOMMMIONEWFILL pfnFill, void *pvUser); 1698 DECLHIDDEN(DECLCALLBACK(int)) pdmR0DevHlpTracing_PhysRead(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead, uint32_t fFlags); 1699 DECLHIDDEN(DECLCALLBACK(int)) pdmR0DevHlpTracing_PhysWrite(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite, uint32_t fFlags); 1700 DECLHIDDEN(DECLCALLBACK(int)) pdmR0DevHlpTracing_PCIPhysRead(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, void *pvBuf, size_t cbRead, uint32_t fFlags); 1701 DECLHIDDEN(DECLCALLBACK(int)) pdmR0DevHlpTracing_PCIPhysWrite(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, const void *pvBuf, size_t cbWrite, uint32_t fFlags); 1702 DECLHIDDEN(DECLCALLBACK(void)) pdmR0DevHlpTracing_PCISetIrq(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel); 1703 DECLHIDDEN(DECLCALLBACK(void)) pdmR0DevHlpTracing_PCISetIrqNoWait(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, int iIrq, int iLevel); 1704 DECLHIDDEN(DECLCALLBACK(void)) pdmR0DevHlpTracing_ISASetIrq(PPDMDEVINS pDevIns, int iIrq, int iLevel); 1705 DECLHIDDEN(DECLCALLBACK(void)) pdmR0DevHlpTracing_ISASetIrqNoWait(PPDMDEVINS pDevIns, int iIrq, int iLevel); 1706 DECLHIDDEN(DECLCALLBACK(void)) pdmR0DevHlpTracing_IoApicSendMsi(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, uint32_t uValue); 1707 # else 1708 # error "Invalid environment selected" 1709 # endif 1710 #endif 1711 1712 1593 1713 /** @} */ 1594 1714
Note:
See TracChangeset
for help on using the changeset viewer.