Changeset 17533 in vbox for trunk/src/VBox/VMM/VMMAll
- Timestamp:
- Mar 8, 2009 3:03:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r17332 r17533 271 271 DECLINLINE(int) iomRamRead(PVM pVM, void *pDest, RTGCPTR GCSrc, uint32_t cb) 272 272 { 273 /* Note: This will fail in R0 or RC if it hits an access handler. That 274 isn't a problem though since the operation can be restarted in REM. */ 273 275 #ifdef IN_RC 274 276 return MMGCRamReadNoTrapHandler(pDest, (void *)GCSrc, cb); … … 280 282 281 283 /** Wrapper for writing virtual memory. */ 282 DECLINLINE(int) iomRamWrite(PVM pVM, RTGCPTR GCDest, void *pSrc, uint32_t cb) 283 { 284 DECLINLINE(int) iomRamWrite(PVM pVM, PCPUMCTXCORE pCtxCore, RTGCPTR GCPtrDst, void *pvSrc, uint32_t cb) 285 { 286 /** @todo Need to update PGMVerifyAccess to take access handlers into account for Ring-0 and 287 * raw mode code. Some thought needs to be spent on theoretical concurrency issues as 288 * as well since we're not behind the pgm lock and handler may change between calls. 289 * MMGCRamWriteNoTrapHandler may also trap if the page isn't shadowed, or was kicked 290 * out from both the shadow pt (SMP or our changes) and TLB. 291 * 292 * Currently MMGCRamWriteNoTrapHandler may also fail when it hits a write access handler. 293 * PGMPhysInterpretedWriteNoHandlers/PGMPhysWriteGCPtr OTOH may mess up the state 294 * of some shadowed structure in R0. */ 284 295 #ifdef IN_RC 285 return MMGCRamWriteNoTrapHandler((void *)GCDest, pSrc, cb); 296 NOREF(pCtxCore); 297 return MMGCRamWriteNoTrapHandler((void *)GCPtrDst, pvSrc, cb); 298 #elif IN_RING0 299 # ifdef VBOX_WITH_NEW_PHYS_CODE /* PGMPhysWriteGCPtr will fail, make sure we ignore handlers here. */ 300 return PGMPhysInterpretedWriteNoHandlers(pVM, pCtxCore, GCPtrDst, pvSrc, cb, false /*fRaiseTrap*/); 301 # else 302 NOREF(pCtxCore); 303 return PGMPhysWriteGCPtr(pVM, GCPtrDst, pvSrc, cb); 304 # endif 286 305 #else 287 return PGMPhysWriteGCPtr(pVM, GCDest, pSrc, cb); 306 NOREF(pCtxCore); 307 return PGMPhysWriteGCPtr(pVM, GCPtrDst, pvSrc, cb); 288 308 #endif 289 309 } … … 492 512 if (rc != VINF_SUCCESS) 493 513 break; 494 rc = iomRamWrite(pVM, (RTGCPTR)pu8Virt, &u32Data, cb);514 rc = iomRamWrite(pVM, pRegFrame, (RTGCPTR)pu8Virt, &u32Data, cb); 495 515 if (rc != VINF_SUCCESS) 496 516 { … … 1515 1535 if (!IOM_SUCCESS(rc)) 1516 1536 break; 1517 int rc2 = iomRamWrite(pVM, GCPtrDst, &u32Value, cbTransfer);1537 int rc2 = iomRamWrite(pVM, pRegFrame, GCPtrDst, &u32Value, cbTransfer); 1518 1538 Assert(rc2 == VINF_SUCCESS); NOREF(rc2); 1519 1539 GCPtrDst = (RTGCPTR)((RTGCUINTPTR)GCPtrDst + cbTransfer);
Note:
See TracChangeset
for help on using the changeset viewer.