VirtualBox

忽略:
時間撮記:
2007-8-29 上午08:56:57 (17 年 以前)
作者:
vboxsync
訊息:

Use PGMPhysRead/WriteGCPtrSafe to respect access handlers, set dirty/accessed bits and deal with crossing page boundaries.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r4411 r4414  
    461461    return MMGCRamReadNoTrapHandler(pDest, GCSrc, cb);
    462462#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);
    474464#endif
    475465}
     
    480470    return MMGCRamWriteNoTrapHandler(GCDest, pSrc, cb);
    481471#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);
    492473#endif
    493474}
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette