Changeset 87371 in vbox for trunk/src/VBox/VMM/VMMR3/PDMDevHlpTracing.cpp
- Timestamp:
- Jan 22, 2021 2:42:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/PDMDevHlpTracing.cpp
r86661 r87371 429 429 Assert(idxBus < RT_ELEMENTS(pVM->pdm.s.aPciBuses)); 430 430 PPDMPCIBUS pBus = &pVM->pdm.s.aPciBuses[idxBus]; 431 432 RTGCPHYS GCPhysOut;433 431 uint16_t const uDevId = PCIBDF_MAKE(pBus->iBus, pPciDev->uDevFn); 434 int rc = pIommu->pfnMemAccess(pDevInsIommu, uDevId, GCPhys, cbRead, PDMIOMMU_MEM_F_READ, &GCPhysOut); 435 if (RT_SUCCESS(rc)) 436 GCPhys = GCPhysOut; 437 else 432 int rc = VINF_SUCCESS; 433 while (cbRead > 0) 438 434 { 439 Log(("pdmR3DevHlp_PCIPhysRead: IOMMU translation failed. uDevId=%#x GCPhys=%#RGp cb=%u rc=%Rrc\n", uDevId, GCPhys, 440 cbRead, rc)); 441 return rc; 435 RTGCPHYS GCPhysOut; 436 size_t cbContig; 437 rc = pIommu->pfnMemAccess(pDevInsIommu, uDevId, GCPhys, cbRead, PDMIOMMU_MEM_F_READ, &GCPhysOut, &cbContig); 438 if (RT_SUCCESS(rc)) 439 { 440 /** @todo Handle strict return codes from PGMPhysRead. */ 441 rc = pDevIns->pHlpR3->pfnPhysRead(pDevIns, GCPhysOut, pvBuf, cbRead, fFlags); 442 if (RT_SUCCESS(rc)) 443 { 444 cbRead -= cbContig; 445 pvBuf = (void *)((uintptr_t)pvBuf + cbContig); 446 GCPhys += cbContig; 447 } 448 else 449 break; 450 } 451 else 452 { 453 Log(("pdmR3DevHlp_PCIPhysRead: IOMMU translation failed. uDevId=%#x GCPhys=%#RGp cb=%u rc=%Rrc\n", uDevId, GCPhys, 454 cbRead, rc)); 455 break; 456 } 442 457 } 443 444 GCPhys = GCPhysOut; 458 return rc; 445 459 } 446 460 #endif … … 485 499 Assert(idxBus < RT_ELEMENTS(pVM->pdm.s.aPciBuses)); 486 500 PPDMPCIBUS pBus = &pVM->pdm.s.aPciBuses[idxBus]; 487 488 RTGCPHYS GCPhysOut;489 501 uint16_t const uDevId = PCIBDF_MAKE(pBus->iBus, pPciDev->uDevFn); 490 int rc = pIommu->pfnMemAccess(pDevInsIommu, uDevId, GCPhys, cbWrite, PDMIOMMU_MEM_F_WRITE, & GCPhysOut); 491 if (RT_SUCCESS(rc)) 492 GCPhys = GCPhysOut; 493 else 502 int rc = VINF_SUCCESS; 503 while (cbWrite > 0) 494 504 { 495 Log(("pdmR3DevHlp_PCIPhysRead: IOMMU translation failed. uDevId=%#x GCPhys=%#RGp cb=%u rc=%Rrc\n", uDevId, GCPhys, 496 cbWrite, rc)); 497 return rc; 505 RTGCPHYS GCPhysOut; 506 size_t cbContig; 507 rc = pIommu->pfnMemAccess(pDevInsIommu, uDevId, GCPhys, cbWrite, PDMIOMMU_MEM_F_WRITE, &GCPhysOut, &cbContig); 508 if (RT_SUCCESS(rc)) 509 { 510 /** @todo Handle strict return codes from PGMPhysWrite. */ 511 rc = pDevIns->pHlpR3->pfnPhysWrite(pDevIns, GCPhysOut, pvBuf, cbContig, fFlags); 512 if (RT_SUCCESS(rc)) 513 { 514 cbWrite -= cbContig; 515 pvBuf = (const void *)((uintptr_t)pvBuf + cbContig); 516 GCPhys += cbContig; 517 } 518 else 519 break; 520 } 521 else 522 { 523 Log(("pdmR3DevHlp_PCIPhysWrite: IOMMU translation failed. uDevId=%#x GCPhys=%#RGp cb=%u rc=%Rrc\n", uDevId, GCPhys, 524 cbWrite, rc)); 525 break; 526 } 498 527 } 499 500 GCPhys = GCPhysOut; 528 return rc; 501 529 } 502 530 #endif
Note:
See TracChangeset
for help on using the changeset viewer.