Changeset 87494 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Feb 1, 2021 5:47:40 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 142518
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PDMAllIommu.cpp
r87483 r87494 63 63 #endif 64 64 return PCIBDF_MAKE(pBus->iBus, pPciDev->uDevFn); 65 } 66 67 68 /** @copydoc PDMIOMMUREGR3::pfnMsiRemap */ 69 int pdmIommuMsiRemap(PPDMDEVINS pDevIns, uint16_t uDeviceId, PCMSIMSG pMsiIn, PMSIMSG pMsiOut) 70 { 71 PPDMIOMMU pIommu = PDMDEVINS_TO_IOMMU(pDevIns); 72 PPDMDEVINS pDevInsIommu = pIommu->CTX_SUFF(pDevIns); 73 if ( pDevInsIommu 74 && pDevInsIommu != pDevIns) 75 { 76 int rc = pIommu->pfnMsiRemap(pDevInsIommu, uDeviceId, pMsiIn, pMsiOut); 77 if (RT_FAILURE(rc)) 78 { 79 LogFunc(("MSI remap failed. uDeviceId=%#x pMsiIn=(%#RX64, %#RU32) rc=%Rrc\n", uDeviceId, pMsiIn->Addr.u64, 80 pMsiIn->Data.u32, rc)); 81 } 82 return rc; 83 } 84 return VERR_IOMMU_NOT_PRESENT; 65 85 } 66 86 … … 178 198 179 199 200 #ifdef IN_RING3 180 201 /** 181 202 * Requests the mapping of a guest page into ring-3 in preparation for a bus master … … 196 217 * pfnPhysReleasePageMappingLock needs. 197 218 */ 198 int pdmIommuMemAccessReadCCPtr(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, uint32_t fFlags, void const **ppv, 199 PPGMPAGEMAPLOCK pLock) 200 { 201 #if defined(IN_RING3) 219 int pdmR3IommuMemAccessReadCCPtr(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, uint32_t fFlags, void const **ppv, 220 PPGMPAGEMAPLOCK pLock) 221 { 202 222 PPDMIOMMU pIommu = PDMDEVINS_TO_IOMMU(pDevIns); 203 223 PPDMDEVINS pDevInsIommu = pIommu->CTX_SUFF(pDevIns); … … 221 241 } 222 242 return VERR_IOMMU_NOT_PRESENT; 223 #else224 RT_NOREF6(pDevIns, pPciDev, GCPhys, fFlags, ppv, pLock);225 return VERR_NOT_IMPLEMENTED;226 #endif227 243 } 228 244 … … 246 262 * pfnPhysReleasePageMappingLock needs. 247 263 */ 248 int pdmIommuMemAccessWriteCCPtr(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, uint32_t fFlags, void **ppv, 249 PPGMPAGEMAPLOCK pLock) 250 { 251 #if defined(IN_RING3) 264 int pdmR3IommuMemAccessWriteCCPtr(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, RTGCPHYS GCPhys, uint32_t fFlags, void **ppv, 265 PPGMPAGEMAPLOCK pLock) 266 { 252 267 PPDMIOMMU pIommu = PDMDEVINS_TO_IOMMU(pDevIns); 253 268 PPDMDEVINS pDevInsIommu = pIommu->CTX_SUFF(pDevIns); … … 271 286 } 272 287 return VERR_IOMMU_NOT_PRESENT; 273 #else274 RT_NOREF6(pDevIns, pPciDev, GCPhys, fFlags, ppv, pLock);275 return VERR_NOT_IMPLEMENTED;276 #endif277 288 } 278 289 … … 299 310 * in length). 300 311 */ 301 int pdmIommuMemAccessBulkReadCCPtr(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t cPages, PCRTGCPHYS paGCPhysPages, 302 uint32_t fFlags, const void **papvPages, PPGMPAGEMAPLOCK paLocks) 303 { 304 #ifdef IN_RING3 312 int pdmR3IommuMemAccessBulkReadCCPtr(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t cPages, PCRTGCPHYS paGCPhysPages, 313 uint32_t fFlags, const void **papvPages, PPGMPAGEMAPLOCK paLocks) 314 { 305 315 PPDMIOMMU pIommu = PDMDEVINS_TO_IOMMU(pDevIns); 306 316 PPDMDEVINS pDevInsIommu = pIommu->CTX_SUFF(pDevIns); … … 339 349 } 340 350 return VERR_IOMMU_NOT_PRESENT; 341 #else342 RT_NOREF7(pDevIns, pPciDev, cPages, paGCPhysPages, fFlags, papvPages, paLocks);343 return VERR_NOT_IMPLEMENTED;344 #endif345 351 } 346 352 … … 367 373 * in length). 368 374 */ 369 int pdmIommuMemAccessBulkWriteCCPtr(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t cPages, PCRTGCPHYS paGCPhysPages, 370 uint32_t fFlags, void **papvPages, PPGMPAGEMAPLOCK paLocks) 371 { 372 #ifdef IN_RING3 375 int pdmR3IommuMemAccessBulkWriteCCPtr(PPDMDEVINS pDevIns, PPDMPCIDEV pPciDev, uint32_t cPages, PCRTGCPHYS paGCPhysPages, 376 uint32_t fFlags, void **papvPages, PPGMPAGEMAPLOCK paLocks) 377 { 373 378 PPDMIOMMU pIommu = PDMDEVINS_TO_IOMMU(pDevIns); 374 379 PPDMDEVINS pDevInsIommu = pIommu->CTX_SUFF(pDevIns); … … 407 412 } 408 413 return VERR_IOMMU_NOT_PRESENT; 409 #else 410 RT_NOREF7(pDevIns, pPciDev, cPages, paGCPhysPages, fFlags, papvPages, paLocks); 411 return VERR_NOT_IMPLEMENTED; 412 #endif 413 } 414 415 416 /** @copydoc PDMIOMMUREGR3::pfnMsiRemap */ 417 int pdmIommuMsiRemap(PPDMDEVINS pDevIns, uint16_t uDeviceId, PCMSIMSG pMsiIn, PMSIMSG pMsiOut) 418 { 419 PPDMIOMMU pIommu = PDMDEVINS_TO_IOMMU(pDevIns); 420 PPDMDEVINS pDevInsIommu = pIommu->CTX_SUFF(pDevIns); 421 if ( pDevInsIommu 422 && pDevInsIommu != pDevIns) 423 { 424 int rc = pIommu->pfnMsiRemap(pDevInsIommu, uDeviceId, pMsiIn, pMsiOut); 425 if (RT_FAILURE(rc)) 426 { 427 LogFunc(("MSI remap failed. uDeviceId=%#x pMsiIn=(%#RX64, %#RU32) rc=%Rrc\n", uDeviceId, pMsiIn->Addr.u64, 428 pMsiIn->Data.u32, rc)); 429 } 430 return rc; 431 } 432 return VERR_IOMMU_NOT_PRESENT; 433 } 434 414 } 415 #endif /* IN_RING3 */ 416
Note:
See TracChangeset
for help on using the changeset viewer.