vbox的更動 4561 路徑 trunk/src/VBox/Devices/VMMDev
- 時間撮記:
- 2007-9-6 上午09:54:06 (17 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/VMMDev/VMMDevHGCM.cpp
r4200 r4561 53 53 uint32_t cPages; 54 54 55 /* Pointer to array of the HCaddresses for these pages.56 * It is assumed that the HCaddress of the locked resident57 * guest p hysical page does not change.55 /* Pointer to array of the GC physical addresses for these pages. 56 * It is assumed that the physical address of the locked resident 57 * guest page does not change. 58 58 */ 59 RT HCPTR*paPages;59 RTGCPHYS *paPages; 60 60 61 61 } VBOXHGCMLINPTR; … … 181 181 uint32_t iLinPtr, 182 182 VBOXHGCMLINPTR *paLinPtrs, 183 RT HCPTR**ppPages)183 RTGCPHYS **ppPages) 184 184 { 185 185 int rc = VINF_SUCCESS; … … 211 211 { 212 212 /* convert */ 213 RT HCPTR HCPtr;214 215 rc = PDMDevHlpPhysGCPtr2 HCPtr(pDevIns, GCPtr, &HCPtr);216 217 Log(("vmmdevHGCMSaveLinPtr: Page %d: %VGv -> % p. %Vrc\n", iPage, GCPtr, HCPtr, rc));213 RTGCPHYS GCPhys; 214 215 rc = PDMDevHlpPhysGCPtr2GCPhys(pDevIns, GCPtr, &GCPhys); 216 217 Log(("vmmdevHGCMSaveLinPtr: Page %d: %VGv -> %VGp. %Vrc\n", iPage, GCPtr, GCPhys, rc)); 218 218 219 219 if (VBOX_FAILURE (rc)) … … 223 223 224 224 /* store */ 225 pLinPtr->paPages[iPage++] = HCPtr;225 pLinPtr->paPages[iPage++] = GCPhys; 226 226 227 227 /* next */ … … 247 247 AssertRelease (u32Size > 0 && iParm == (uint32_t)pLinPtr->iParm); 248 248 249 uint8_t *pu8Dst = (uint8_t *)pLinPtr->paPages[0] + pLinPtr->cbOffsetFirstPage;250 uint8_t *pu8Src = (uint8_t *)pvHost;249 RTGCPHYS GCPhysDst = pLinPtr->paPages[0] + pLinPtr->cbOffsetFirstPage; 250 uint8_t *pu8Src = (uint8_t *)pvHost; 251 251 252 252 Log(("vmmdevHGCMWriteLinPtr: parm %d: size %d, cPages = %d\n", iParm, u32Size, pLinPtr->cPages)); … … 261 261 PAGE_SIZE; 262 262 263 Log(("vmmdevHGCMWriteLinPtr: page %d: dst % p, src %p, cbWrite %d\n", iPage, pu8Dst, pu8Src, cbWrite));263 Log(("vmmdevHGCMWriteLinPtr: page %d: dst %VGp, src %p, cbWrite %d\n", iPage, GCPhysDst, pu8Src, cbWrite)); 264 264 265 265 iPage++; … … 267 267 if (cbWrite >= u32Size) 268 268 { 269 memcpy (pu8Dst, pu8Src, u32Size);269 PDMDevHlpPhysWrite(pDevIns, GCPhysDst, pu8Src, u32Size); 270 270 u32Size = 0; 271 271 break; 272 272 } 273 273 274 memcpy (pu8Dst, pu8Src, cbWrite);274 PDMDevHlpPhysWrite(pDevIns, GCPhysDst, pu8Src, cbWrite); 275 275 276 276 /* next */ … … 278 278 pu8Src += cbWrite; 279 279 280 pu8Dst = (uint8_t *)pLinPtr->paPages[iPage];280 GCPhysDst = pLinPtr->paPages[iPage]; 281 281 } 282 282 … … 427 427 { 428 428 pCmd->paLinPtrs = (VBOXHGCMLINPTR *)RTMemAlloc ( sizeof (VBOXHGCMLINPTR) * cLinPtrs 429 + sizeof (RT HCPTR) * cLinPtrPages);429 + sizeof (RTGCPHYS) * cLinPtrPages); 430 430 431 431 if (pCmd->paLinPtrs == NULL) … … 457 457 458 458 uint32_t iLinPtr = 0; 459 RT HCPTR *pPages = (RTHCPTR*)((uint8_t *)pCmd->paLinPtrs + sizeof (VBOXHGCMLINPTR) *cLinPtrs);459 RTGCPHYS *pPages = (RTGCPHYS *)((uint8_t *)pCmd->paLinPtrs + sizeof (VBOXHGCMLINPTR) *cLinPtrs); 460 460 461 461 for (i = 0; i < cParms && VBOX_SUCCESS(rc); i++, pGuestParm++, pHostParm++)
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器