Changeset 4416 in vbox
- Timestamp:
- Aug 29, 2007 9:02:17 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 23988
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r4414 r4416 281 281 DECLINLINE(int) emRamRead(PVM pVM, void *pDest, RTGCPTR GCSrc, uint32_t cb) 282 282 { 283 #ifdef IN_GC 284 int rc = MMGCRamRead(pVM, pDest, GCSrc, cb); 283 int rc; 284 #ifdef IN_GC 285 rc = MMGCRamRead(pVM, pDest, GCSrc, cb); 285 286 if (RT_LIKELY(rc != VERR_ACCESS_DENIED)) 286 287 return rc; … … 290 291 * instruction and it either flushed the TLB or the CPU reused it. 291 292 */ 293 #endif 292 294 RTGCPHYS GCPhys; 293 295 RTGCUINTPTR offset; … … 299 301 PGMPhysRead(pVM, GCPhys + offset, pDest, cb); 300 302 return VINF_SUCCESS; 301 #else302 return PGMPhysReadGCPtrSafe(pVM, pDest, GCSrc, cb);303 #endif304 303 } 305 304 … … 330 329 331 330 #else 332 return PGMPhysWriteGCPtrSafe(pVM, GCDest, pSrc, cb); 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; 333 341 #endif 334 342 } -
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r4414 r4416 461 461 return MMGCRamReadNoTrapHandler(pDest, GCSrc, cb); 462 462 #else 463 return PGMPhysReadGCPtrSafe(pVM, pDest, GCSrc, cb); 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; 464 474 #endif 465 475 } … … 470 480 return MMGCRamWriteNoTrapHandler(GCDest, pSrc, cb); 471 481 #else 472 return PGMPhysWriteGCPtrSafe(pVM, GCDest, pSrc, cb); 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; 473 492 #endif 474 493 }
Note:
See TracChangeset
for help on using the changeset viewer.