Changeset 55900 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- May 18, 2015 10:17:35 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r55899 r55900 2082 2082 * @param pvBuf Where to put the bits we read. 2083 2083 * @param cb How much to read - less or equal to a page. 2084 */ 2085 static int pgmPhysReadHandler(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void *pvBuf, size_t cb) 2084 * @param enmOrigin The origin of this call. 2085 */ 2086 static int pgmPhysReadHandler(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void *pvBuf, size_t cb, PGMACCESSORIGIN enmOrigin) 2086 2087 { 2087 2088 /* … … 2108 2109 * Deal with any physical handlers. 2109 2110 */ 2111 PVMCPU pVCpu = VMMGetCpu(pVM); 2110 2112 #ifdef IN_RING3 2111 2113 PPGMPHYSHANDLER pPhys = NULL; … … 2174 2176 2175 2177 STAM_PROFILE_START(&pVirt->Stat, h); 2176 rc2 = pVirtType->CTX_SUFF(pfnHandler)(pVM, GCPtr, (void *)pvSrc, pvBuf, cb, PGMACCESSTYPE_READ,2178 rc2 = pVirtType->CTX_SUFF(pfnHandler)(pVM, pVCpu, GCPtr, (void *)pvSrc, pvBuf, cb, PGMACCESSTYPE_READ, enmOrigin, 2177 2179 pVirt->CTX_SUFF(pvUser)); 2178 2180 STAM_PROFILE_STOP(&pVirt->Stat, h); … … 2254 2256 || PGM_PAGE_IS_SPECIAL_ALIAS_MMIO(pPage))) 2255 2257 { 2256 int rc = pgmPhysReadHandler(pVM, pPage, pRam->GCPhys + off, pvBuf, cb );2258 int rc = pgmPhysReadHandler(pVM, pPage, pRam->GCPhys + off, pvBuf, cb, enmOrigin); 2257 2259 if (RT_FAILURE(rc)) 2258 2260 { … … 2337 2339 * @param pvBuf What to write. 2338 2340 * @param cbWrite How much to write - less or equal to a page. 2339 */ 2340 static int pgmPhysWriteHandler(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void const *pvBuf, size_t cbWrite) 2341 * @param enmOrigin The origin of this call. 2342 */ 2343 static int pgmPhysWriteHandler(PVM pVM, PPGMPAGE pPage, RTGCPHYS GCPhys, void const *pvBuf, size_t cbWrite, 2344 PGMACCESSORIGIN enmOrigin) 2341 2345 { 2342 2346 PGMPAGEMAPLOCK PgMpLck; … … 2351 2355 * the heavy usage of full page handlers in the page pool. 2352 2356 */ 2357 PVMCPU pVCpu = VMMGetCpu(pVM); 2353 2358 if ( !PGM_PAGE_HAS_ACTIVE_VIRTUAL_HANDLERS(pPage) 2354 2359 || PGM_PAGE_IS_MMIO_OR_SPECIAL_ALIAS(pPage) /* screw virtual handlers on MMIO pages */) … … 2461 2466 2462 2467 STAM_PROFILE_START(&pCur->Stat, h); 2463 rc = pCurType->CTX_SUFF(pfnHandler)(pVM, GCPtr, pvDst, (void *)pvBuf, cbRange, PGMACCESSTYPE_WRITE,2464 pCur->CTX_SUFF(pvUser));2468 rc = pCurType->CTX_SUFF(pfnHandler)(pVM, pVCpu, GCPtr, pvDst, (void *)pvBuf, cbRange, PGMACCESSTYPE_WRITE, 2469 enmOrigin, pCur->CTX_SUFF(pvUser)); 2465 2470 STAM_PROFILE_STOP(&pCur->Stat, h); 2466 2471 } … … 2649 2654 + (GCPhys & PAGE_OFFSET_MASK); 2650 2655 STAM_PROFILE_START(&pVirt->Stat, h); 2651 rc = pVirtType->CTX_SUFF(pfnHandler)(pVM, GCPtr, pvDst, (void *)pvBuf, cbRange, PGMACCESSTYPE_WRITE,2652 pVirt->CTX_SUFF(pvUser));2656 rc = pVirtType->CTX_SUFF(pfnHandler)(pVM, pVCpu, GCPtr, pvDst, (void *)pvBuf, cbRange, PGMACCESSTYPE_WRITE, 2657 enmOrigin, pVirt->CTX_SUFF(pvUser)); 2653 2658 STAM_PROFILE_STOP(&pVirt->Stat, h); 2654 2659 AssertLogRelMsg(rc == VINF_SUCCESS || rc == VINF_PGM_HANDLER_DO_DEFAULT, ("rc=%Rrc GCPhys=%RGp pPage=%R[pgmpage] %s\n", rc, GCPhys, pPage, pVirt->pszDesc)); … … 2704 2709 + (GCPhys & PAGE_OFFSET_MASK); 2705 2710 STAM_PROFILE_START(&pVirt->Stat, h2); 2706 int rc2 = pVirtType->CTX_SUFF(pfnHandler)(pVM, GCPtr, pvDst, (void *)pvBuf, cbRange, PGMACCESSTYPE_WRITE,2707 pVirt->CTX_SUFF(pvUser));2711 int rc2 = pVirtType->CTX_SUFF(pfnHandler)(pVM, pVCpu, GCPtr, pvDst, (void *)pvBuf, cbRange, PGMACCESSTYPE_WRITE, 2712 enmOrigin, pVirt->CTX_SUFF(pvUser)); 2708 2713 STAM_PROFILE_STOP(&pVirt->Stat, h2); 2709 2714 if (rc2 == VINF_SUCCESS && rc == VINF_PGM_HANDLER_DO_DEFAULT) … … 2801 2806 || PGM_PAGE_IS_SPECIAL_ALIAS_MMIO(pPage)) 2802 2807 { 2803 int rc = pgmPhysWriteHandler(pVM, pPage, pRam->GCPhys + off, pvBuf, cb );2808 int rc = pgmPhysWriteHandler(pVM, pPage, pRam->GCPhys + off, pvBuf, cb, enmOrigin); 2804 2809 if (RT_FAILURE(rc)) 2805 2810 {
Note:
See TracChangeset
for help on using the changeset viewer.