Changeset 20674 in vbox
- Timestamp:
- Jun 17, 2009 4:04:53 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 48773
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r20567 r20674 2243 2243 return VINF_SUCCESS; 2244 2244 2245 /* Take the PGM lock here, because many called functions take the lock for a very short period. That's counter-productive 2246 * when many VCPUs are fighting for the lock. 2247 */ 2248 pgmLock(pVM); 2249 2245 2250 /* map the 1st page */ 2246 2251 void const *pvSrc; … … 2248 2253 int rc = PGMPhysGCPtr2CCPtrReadOnly(pVCpu, GCPtrSrc, &pvSrc, &Lock); 2249 2254 if (RT_FAILURE(rc)) 2255 { 2256 pgmUnlock(pVM); 2250 2257 return rc; 2258 } 2251 2259 2252 2260 /* optimize for the case where access is completely within the first page. */ … … 2256 2264 memcpy(pvDst, pvSrc, cb); 2257 2265 PGMPhysReleasePageMappingLock(pVM, &Lock); 2266 pgmUnlock(pVM); 2258 2267 return VINF_SUCCESS; 2259 2268 } … … 2274 2283 rc = PGMPhysGCPtr2CCPtrReadOnly(pVCpu, GCPtrSrc, &pvSrc, &Lock); 2275 2284 if (RT_FAILURE(rc)) 2285 { 2286 pgmUnlock(pVM); 2276 2287 return rc; 2288 } 2277 2289 2278 2290 /* last page? */ … … 2281 2293 memcpy(pvDst, pvSrc, cb); 2282 2294 PGMPhysReleasePageMappingLock(pVM, &Lock); 2295 pgmUnlock(pVM); 2283 2296 return VINF_SUCCESS; 2284 2297 }
Note:
See TracChangeset
for help on using the changeset viewer.