Changeset 87496 in vbox for trunk/src/VBox/Devices/Bus
- Timestamp:
- Feb 1, 2021 9:28:01 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevIommuAmd.cpp
r87483 r87496 2566 2566 { 2567 2567 /* Check if device access to addresses in the exclusion range can be forwarded untranslated. */ 2568 if ( 2569 || 2568 if ( pThis->ExclRangeBaseAddr.n.u1AllowAll 2569 || pDte->n.u1AllowExclusion) 2570 2570 return true; 2571 2571 } … … 3787 3787 * and freeing buffers while processing commands. 3788 3788 */ 3789 size_t c bMaxCmds= sizeof(CMD_GENERIC_T) * iommuAmdGetBufMaxEntries(15);3790 void *pvCmds = RTMemAllocZ(cbMaxCmd s);3791 Assert Return(pvCmds, VERR_NO_MEMORY);3789 size_t const cbMaxCmdBuf = sizeof(CMD_GENERIC_T) * iommuAmdGetBufMaxEntries(15); 3790 void *pvCmds = RTMemAllocZ(cbMaxCmdBuf); 3791 AssertPtrReturn(pvCmds, VERR_NO_MEMORY); 3792 3792 3793 3793 while (pThread->enmState == PDMTHREADSTATE_RUNNING) … … 3817 3817 /** @todo r=ramshankar: We currently copy all commands from guest memory into a 3818 3818 * temporary host buffer before processing them as a batch. If we want to 3819 * save on host memory a bit we could, once PGM has the necessary APIs, lock3820 * thepage mappings and access them directly. */3819 * save on host memory a bit, we could (once PGM has the necessary APIs) 3820 * lock the page mappings page mappings and access them directly. */ 3821 3821 IOMMU_LOCK(pDevIns); 3822 3822 … … 3832 3832 Assert(!(offHead & ~IOMMU_CMD_BUF_HEAD_PTR_VALID_MASK)); 3833 3833 Assert(offHead < cbCmdBuf); 3834 Assert(cbCmdBuf <= cbMaxCmd s);3834 Assert(cbCmdBuf <= cbMaxCmdBuf); 3835 3835 3836 3836 if (offHead != offTail) … … 3869 3869 break; 3870 3870 } 3871 3872 /* Move to the next command in the circular buffer. */ 3871 3873 offHead = (offHead + sizeof(CMD_GENERIC_T)) % cbCmdBuf; 3872 3874 } while (offHead != offTail); … … 3878 3880 iommuAmdCmdHwErrorEventInit(GCPhysCmdBufBase, &EvtCmdHwErr); 3879 3881 iommuAmdCmdHwErrorEventRaise(pDevIns, &EvtCmdHwErr); 3882 3880 3883 IOMMU_UNLOCK(pDevIns); 3881 3884 }
Note:
See TracChangeset
for help on using the changeset viewer.