Changeset 4414 in vbox
- Timestamp:
- Aug 29, 2007 8:56:57 AM (17 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r4401 r4414 281 281 DECLINLINE(int) emRamRead(PVM pVM, void *pDest, RTGCPTR GCSrc, uint32_t cb) 282 282 { 283 int rc; 284 #ifdef IN_GC 285 rc = MMGCRamRead(pVM, pDest, GCSrc, cb); 283 #ifdef IN_GC 284 int rc = MMGCRamRead(pVM, pDest, GCSrc, cb); 286 285 if (RT_LIKELY(rc != VERR_ACCESS_DENIED)) 287 286 return rc; … … 291 290 * instruction and it either flushed the TLB or the CPU reused it. 292 291 */ 293 #endif294 292 RTGCPHYS GCPhys; 295 293 RTGCUINTPTR offset; … … 301 299 PGMPhysRead(pVM, GCPhys + offset, pDest, cb); 302 300 return VINF_SUCCESS; 301 #else 302 return PGMPhysReadGCPtrSafe(pVM, pDest, GCSrc, cb); 303 #endif 303 304 } 304 305 … … 329 330 330 331 #else 331 332 int rc; 333 RTGCPHYS GCPhys; 334 RTGCUINTPTR offset; 335 336 offset = GCDest & PAGE_OFFSET_MASK; 337 rc = PGMPhysGCPtr2GCPhys(pVM, GCDest, &GCPhys); 338 AssertRCReturn(rc, rc); 339 PGMPhysWrite(pVM, GCPhys + offset, pSrc, cb); 340 return VINF_SUCCESS; 332 return PGMPhysWriteGCPtrSafe(pVM, GCDest, pSrc, cb); 341 333 #endif 342 334 } -
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r4411 r4414 461 461 return MMGCRamReadNoTrapHandler(pDest, GCSrc, cb); 462 462 #else 463 int rc; 464 RTGCPHYS GCPhys; 465 RTGCUINTPTR offset; 466 467 offset = GCSrc & PAGE_OFFSET_MASK; 468 469 /** @todo optimize the loop; no need to convert the address all the time */ 470 rc = PGMPhysGCPtr2GCPhys(pVM, GCSrc, &GCPhys); 471 AssertRCReturn(rc, rc); 472 PGMPhysRead(pVM, GCPhys + offset, pDest, cb); 473 return VINF_SUCCESS; 463 return PGMPhysReadGCPtrSafe(pVM, pDest, GCSrc, cb); 474 464 #endif 475 465 } … … 480 470 return MMGCRamWriteNoTrapHandler(GCDest, pSrc, cb); 481 471 #else 482 int rc; 483 RTGCPHYS GCPhys; 484 RTGCUINTPTR offset; 485 486 /** @todo optimize the loop; no need to convert the address all the time */ 487 offset = GCDest & PAGE_OFFSET_MASK; 488 rc = PGMPhysGCPtr2GCPhys(pVM, GCDest, &GCPhys); 489 AssertRCReturn(rc, rc); 490 PGMPhysWrite(pVM, GCPhys + offset, pSrc, cb); 491 return VINF_SUCCESS; 472 return PGMPhysWriteGCPtrSafe(pVM, GCDest, pSrc, cb); 492 473 #endif 493 474 }
Note:
See TracChangeset
for help on using the changeset viewer.