Changeset 81462 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Oct 22, 2019 9:10:18 PM (5 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp
r81433 r81462 357 357 358 358 359 #ifdef IN_RING3 360 /** 361 * Helper for IOMR3ProcessForceFlag() that lives here to utilize iomMmioDoWrite et al. 362 */ 363 VBOXSTRICTRC iomR3MmioCommitWorker(PVM pVM, PVMCPU pVCpu, PIOMMMIOENTRYR3 pRegEntry, RTGCPHYS offRegion) 364 { 365 # ifdef VBOX_WITH_STATISTICS 366 STAM_PROFILE_START(UnusedMacroArg, Prf); 367 PIOMMMIOSTATSENTRY const pStats = iomMmioGetStats(pVM, pRegEntry); 368 # endif 369 PPDMDEVINS const pDevIns = pRegEntry->pDevIns; 370 int rc = PDMCritSectEnter(pDevIns->CTX_SUFF(pCritSectRo), VERR_IGNORED); 371 AssertRCReturn(rc, rc); 372 373 VBOXSTRICTRC rcStrict = iomMmioDoWrite(pVM, pVCpu, pRegEntry, pVCpu->iom.s.PendingMmioWrite.GCPhys, offRegion, 374 pVCpu->iom.s.PendingMmioWrite.abValue, pVCpu->iom.s.PendingMmioWrite.cbValue 375 IOM_MMIO_STATS_COMMA_ARG); 376 377 PDMCritSectLeave(pDevIns->CTX_SUFF(pCritSectRo)); 378 STAM_PROFILE_STOP(&pStats->ProfWriteR3, Prf); 379 return rcStrict; 380 } 381 #endif /* IN_RING3 */ 382 383 359 384 /** 360 385 * Deals with complicated MMIO reads. -
trunk/src/VBox/VMM/VMMR3/IOM.cpp
r81437 r81462 1914 1914 pVCpu->iom.s.PendingMmioWrite.GCPhys, pVCpu->iom.s.PendingMmioWrite.cbValue)); 1915 1915 1916 #if 01917 1916 /* Use new MMIO handle hint and bypass PGM if it still looks right. */ 1918 1917 size_t idxMmioRegionHint = pVCpu->iom.s.PendingMmioWrite.idxMmioRegionHint; … … 1924 1923 if (offRegion < pRegEntry->cbRegion && GCPhysMapping != NIL_RTGCPHYS) 1925 1924 { 1926 rcStrict = iomMmioDoWrite(pVM, pVCpu, pRegEntry, GCPhysFault, offRegion, pvBuf, (uint32_t)cbBuf IOM_MMIO_STATS_COMMA_ARG); 1927 PDMCritSectLeave(pDevIns->CTX_SUFF(pCritSectRo)); 1928 STAM_COUNTER_INC(&pStats->Writes); 1929 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfWrite), Prf); 1925 VBOXSTRICTRC rcStrictCommit = iomR3MmioCommitWorker(pVM, pVCpu, pRegEntry, offRegion); 1926 pVCpu->iom.s.PendingMmioWrite.cbValue = 0; 1927 return iomR3MergeStatus(rcStrict, rcStrictCommit, VINF_IOM_R3_MMIO_COMMIT_WRITE, pVCpu); 1930 1928 } 1931 1929 } 1932 #endif 1933 1934 /** @todo Try optimize this some day? Currently easier and more correct to 1935 * involve PGM here since we never know if the MMIO area is still mapped 1936 * to the same location as when we wrote to it in RC/R0 context. */ 1930 1931 /* Fall back on PGM. */ 1937 1932 VBOXSTRICTRC rcStrictCommit = PGMPhysWrite(pVM, pVCpu->iom.s.PendingMmioWrite.GCPhys, 1938 1933 pVCpu->iom.s.PendingMmioWrite.abValue, pVCpu->iom.s.PendingMmioWrite.cbValue, -
trunk/src/VBox/VMM/include/IOMInternal.h
r81375 r81462 853 853 DECLCALLBACK(void) iomR3MmioInfo(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs); 854 854 void iomR3MmioRegStats(PVM pVM, PIOMMMIOENTRYR3 pRegEntry); 855 VBOXSTRICTRC iomR3MmioCommitWorker(PVM pVM, PVMCPU pVCpu, PIOMMMIOENTRYR3 pRegEntry, RTGCPHYS offRegion); /* IOMAllMmioNew.cpp */ 855 856 #endif /* IN_RING3 */ 856 857 #ifdef IN_RING0
Note:
See TracChangeset
for help on using the changeset viewer.