儲存庫 vbox 的更動 4679
- 時間撮記:
- 2007-9-10 下午04:04:46 (17 年 以前)
- 位置:
- trunk
- 檔案:
-
- 修改 3 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/include/VBox/pgm.h
r4665 r4679 838 838 * @param pVM The VM Handle 839 839 * @param GCPtr The guest pointer to convert. 840 * @param pGCPhys Where to store the HC physical address.840 * @param pGCPhys Where to store the GC physical address. 841 841 */ 842 842 PGMDECL(int) PGMPhysGCPtr2GCPhys(PVM pVM, RTGCPTR GCPtr, PRTGCPHYS pGCPhys); -
trunk/src/VBox/VMM/VMMAll/EMAll.cpp
r4419 r4679 290 290 * instruction and it either flushed the TLB or the CPU reused it. 291 291 */ 292 RTGCPHYS GCPhys; 293 RTGCUINTPTR offset; 294 295 offset = (RTGCUINTPTR)GCSrc & PAGE_OFFSET_MASK; 296 292 RTGCPHYS GCPhys; 297 293 rc = PGMPhysGCPtr2GCPhys(pVM, GCSrc, &GCPhys); 298 294 AssertRCReturn(rc, rc); 299 PGMPhysRead(pVM, GCPhys + offset, pDest, cb);295 PGMPhysRead(pVM, GCPhys, pDest, cb); 300 296 return VINF_SUCCESS; 301 297 #else -
trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp
r4665 r4679 830 830 * @param pVM The VM Handle 831 831 * @param GCPtr The guest pointer to convert. 832 * @param pGCPhys Where to store the HC physical address.832 * @param pGCPhys Where to store the GC physical address. 833 833 */ 834 834 PGMDECL(int) PGMPhysGCPtr2GCPhys(PVM pVM, RTGCPTR GCPtr, PRTGCPHYS pGCPhys) 835 835 { 836 return PGM_GST_PFN(GetPage,pVM)(pVM, (RTGCUINTPTR)GCPtr, NULL, pGCPhys); 836 int rc = PGM_GST_PFN(GetPage,pVM)(pVM, (RTGCUINTPTR)GCPtr, NULL, pGCPhys); 837 if (pGCPhys && VBOX_SUCCESS(rc)) 838 *pGCPhys |= (RTGCUINTPTR)GCPtr & PAGE_OFFSET_MASK; 839 return rc; 837 840 } 838 841 … … 1927 1930 { 1928 1931 /* Convert virtual to physical address */ 1929 offset = GCPtrSrc & PAGE_OFFSET_MASK;1930 1932 rc = PGMPhysGCPtr2GCPhys(pVM, GCPtrSrc, &GCPhys); 1931 1933 AssertRCReturn(rc, rc); … … 1935 1937 AssertRC(rc); 1936 1938 1937 PGMPhysRead(pVM, GCPhys + offset, pvDst, cb);1939 PGMPhysRead(pVM, GCPhys, pvDst, cb); 1938 1940 return VINF_SUCCESS; 1939 1941 } … … 1945 1947 { 1946 1948 /* Convert virtual to physical address */ 1947 offset = GCPtrSrc & PAGE_OFFSET_MASK;1948 1949 rc = PGMPhysGCPtr2GCPhys(pVM, GCPtrSrc, &GCPhys); 1949 1950 AssertRCReturn(rc, rc); … … 1957 1958 if (cbRead >= cb) 1958 1959 { 1959 PGMPhysRead(pVM, GCPhys + offset, pvDst, cb);1960 PGMPhysRead(pVM, GCPhys, pvDst, cb); 1960 1961 return VINF_SUCCESS; 1961 1962 } 1962 PGMPhysRead(pVM, GCPhys + offset, pvDst, cbRead);1963 PGMPhysRead(pVM, GCPhys, pvDst, cbRead); 1963 1964 1964 1965 /* next */ … … 2003 2004 { 2004 2005 /* Convert virtual to physical address */ 2005 offset = GCPtrDst & PAGE_OFFSET_MASK;2006 2006 rc = PGMPhysGCPtr2GCPhys(pVM, GCPtrDst, &GCPhys); 2007 2007 AssertRCReturn(rc, rc); … … 2011 2011 AssertRC(rc); 2012 2012 2013 PGMPhysWrite(pVM, GCPhys + offset, pvSrc, cb);2013 PGMPhysWrite(pVM, GCPhys, pvSrc, cb); 2014 2014 return VINF_SUCCESS; 2015 2015 } … … 2021 2021 { 2022 2022 /* Convert virtual to physical address */ 2023 offset = GCPtrDst & PAGE_OFFSET_MASK;2024 2023 rc = PGMPhysGCPtr2GCPhys(pVM, GCPtrDst, &GCPhys); 2025 2024 AssertRCReturn(rc, rc); … … 2033 2032 if (cbWrite >= cb) 2034 2033 { 2035 PGMPhysWrite(pVM, GCPhys + offset, pvSrc, cb);2034 PGMPhysWrite(pVM, GCPhys, pvSrc, cb); 2036 2035 return VINF_SUCCESS; 2037 2036 } 2038 PGMPhysWrite(pVM, GCPhys + offset, pvSrc, cbWrite);2037 PGMPhysWrite(pVM, GCPhys, pvSrc, cbWrite); 2039 2038 2040 2039 /* next */
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器