Changeset 1643 in vbox
- Timestamp:
- Mar 22, 2007 6:01:05 PM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 19771
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuest.h
r1550 r1643 30 30 * Defined Constants And Macros * 31 31 *******************************************************************************/ 32 33 /** @todo The following is a temporary fix for the problem of accessing 34 hypervisor pointers from within guest additions */ 35 36 /** Hypervisor linear pointer size type */ 37 typedef uint32_t vmmDevHypPtr; 38 /** Hypervisor physical pointer size type */ 39 typedef uint32_t vmmDevHypPhys; 32 40 33 41 #ifdef __WIN__ … … 250 258 VMMDevRequestHeader header; 251 259 /** guest virtual address of proposed hypervisor start */ 252 RTGCPTRhypervisorStart;260 vmmDevHypPtr hypervisorStart; 253 261 /** hypervisor size in bytes */ 254 262 uint32_t hypervisorSize; … … 449 457 union 450 458 { 451 RTGCPHYSphysAddr;452 RTGCPTRlinearAddr;459 vmmDevHypPhys physAddr; 460 vmmDevHypPtr linearAddr; 453 461 } u; 454 462 } Pointer; -
trunk/src/VBox/Additions/linux/module/vboxmod.c
r1619 r1643 324 324 { 325 325 /* We are sending data to the host or sending and reading. */ 326 void *pvR3LinAddr 327 = (void *)VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.u.linearAddr; 326 328 if (copy_from_user(&pu8PointerData[offPointerData], 327 VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.u.linearAddr,329 pvR3LinAddr, 328 330 VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.size)) 329 331 { … … 333 335 } 334 336 VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.u.linearAddr 335 = &pu8PointerData[offPointerData];337 = (vmmDevHypPtr)&pu8PointerData[offPointerData]; 336 338 VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.size 337 339 = VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.size; … … 343 345 /* We are reading data from the host */ 344 346 VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.u.linearAddr 345 = &pu8PointerData[offPointerData];347 = (vmmDevHypPtr)&pu8PointerData[offPointerData]; 346 348 VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.size 347 349 = VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.size; … … 371 373 { 372 374 /* We are sending data to the host or sending and reading. */ 373 if (copy_to_user(VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.u.linearAddr, 374 VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.u.linearAddr, 375 void *pvR3LinAddr 376 = (void *)VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.u.linearAddr; 377 void *pvR0LinAddr 378 = (void *)VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.u.linearAddr; 379 if (copy_to_user(pvR3LinAddr, pvR0LinAddr, 375 380 VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.size)) 376 381 { … … 555 560 { 556 561 /* communicate result to VMM, align at 4MB */ 557 req->hypervisorStart = ( RTGCPTR)ALIGNP(hypervisorArea, 0x400000);562 req->hypervisorStart = (vmmDevHypPtr)ALIGNP(hypervisorArea, 0x400000); 558 563 req->header.requestType = VMMDevReq_SetHypervisorInfo; 559 564 req->header.rc = VERR_GENERAL_FAILURE;
Note:
See TracChangeset
for help on using the changeset viewer.