Changeset 89454 in vbox
- Timestamp:
- Jun 2, 2021 8:00:30 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuIntel.cpp
r89453 r89454 1915 1915 * 1916 1916 * @returns @c true if it's supported, @c false otherwise. 1917 * @param pThis The shared DMAR device state. 1918 * @param pCtxEntry The context entry. 1919 * @param pcPagingLevel Where to store the paging level. Optional, can be 1920 * NULL. 1917 * @param pThis The shared DMAR device state. 1918 * @param pCtxEntry The context entry. 1919 * @param pcPagingLevel Where to store the paging level. Optional, can be NULL. 1921 1920 */ 1922 1921 static bool dmarDrLegacyModeIsAwValid(PCDMAR pThis, PCVTD_CONTEXT_ENTRY_T pCtxEntry, uint8_t *pcPagingLevel) … … 2279 2278 if (pMemReqRemap->Req.enmAddrType == PCIADDRTYPE_UNTRANSLATED) 2280 2279 { 2281 /** @todo Check AW == maximum SAGAW bit? */ 2282 pMemReqRemap->Iotlbe.GCPhysBase = pMemReqRemap->Req.uDmaAddr & X86_PAGE_4K_BASE_MASK; 2283 pMemReqRemap->Iotlbe.cShift = X86_PAGE_4K_SHIFT; 2284 pMemReqRemap->Iotlbe.fPerm = DMAR_PERM_ALL; 2285 pMemReqRemap->Iotlbe.idDomain = idDomain; 2286 pMemReqRemap->cbContiguous = pMemReqRemap->Req.cbDma; 2287 return VINF_SUCCESS; 2280 if (dmarDrLegacyModeIsAwValid(pThis, &CtxEntry, NULL /* pcPagingLevel */)) 2281 { 2282 pMemReqRemap->Iotlbe.GCPhysBase = pMemReqRemap->Req.uDmaAddr & X86_PAGE_4K_BASE_MASK; 2283 pMemReqRemap->Iotlbe.cShift = X86_PAGE_4K_SHIFT; 2284 pMemReqRemap->Iotlbe.fPerm = DMAR_PERM_ALL; 2285 pMemReqRemap->Iotlbe.idDomain = idDomain; 2286 pMemReqRemap->cbContiguous = pMemReqRemap->Req.cbDma; 2287 return VINF_SUCCESS; 2288 } 2289 dmarAtFaultRecord(pDevIns, kDmarDiag_Atf_Lgn_1_3, VTDATFAULT_LGN_1_3, pMemReqRemap); 2288 2290 } 2289 dmarAtFaultRecord(pDevIns, kDmarDiag_Atf_Lct_5, VTDATFAULT_LCT_5, pMemReqRemap); 2291 else 2292 dmarAtFaultRecord(pDevIns, kDmarDiag_Atf_Lct_5, VTDATFAULT_LCT_5, pMemReqRemap); 2290 2293 break; 2291 2294 } … … 3538 3541 dmarRegWriteRaw64(pThis, VTD_MMIO_OFF_CAP_REG, pThis->fCapReg); 3539 3542 3540 pThis->fHawBaseMask = ~(UINT64_MAX << cGstPhysAddrBits) & X86_PAGE_4K_BASE_MASK;3541 pThis->fInvMgawMask = UINT64_MAX << cGstPhysAddrBits;3543 pThis->fHawBaseMask = ~(UINT64_MAX << cGstPhysAddrBits) & X86_PAGE_4K_BASE_MASK; 3544 pThis->fInvMgawMask = UINT64_MAX << cGstPhysAddrBits; 3542 3545 pThis->cMaxPagingLevel = vtdCapRegGetMaxPagingLevel(fSagaw); 3543 3546 }
Note:
See TracChangeset
for help on using the changeset viewer.