VirtualBox

Changeset 1643 in vbox


Ignore:
Timestamp:
Mar 22, 2007 6:01:05 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
19771
Message:

Hack to remove RTGCPTR from Linux guest additions

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxGuest.h

    r1550 r1643  
    3030*   Defined Constants And Macros                                               *
    3131*******************************************************************************/
     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 */
     37typedef uint32_t vmmDevHypPtr;
     38/** Hypervisor physical pointer size type */
     39typedef uint32_t vmmDevHypPhys;
    3240
    3341#ifdef __WIN__
     
    250258    VMMDevRequestHeader header;
    251259    /** guest virtual address of proposed hypervisor start */
    252     RTGCPTR hypervisorStart;
     260    vmmDevHypPtr hypervisorStart;
    253261    /** hypervisor size in bytes */
    254262    uint32_t hypervisorSize;
     
    449457            union
    450458            {
    451                 RTGCPHYS physAddr;
    452                 RTGCPTR  linearAddr;
     459                vmmDevHypPhys physAddr;
     460                vmmDevHypPtr  linearAddr;
    453461            } u;
    454462        } Pointer;
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r1619 r1643  
    324324                {
    325325                    /* 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;
    326328                    if (copy_from_user(&pu8PointerData[offPointerData],
    327                                        VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.u.linearAddr,
     329                                       pvR3LinAddr,
    328330                                       VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.size))
    329331                    {
     
    333335                    }
    334336                    VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.u.linearAddr
    335                         = &pu8PointerData[offPointerData];
     337                        = (vmmDevHypPtr)&pu8PointerData[offPointerData];
    336338                    VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.size
    337339                        = VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.size;
     
    343345                    /* We are reading data from the host */
    344346                    VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.u.linearAddr
    345                         = &pu8PointerData[offPointerData];
     347                        = (vmmDevHypPtr)&pu8PointerData[offPointerData];
    346348                    VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.size
    347349                        = VBOXGUEST_HGCM_CALL_PARMS(hgcmR3)[i].u.Pointer.size;
     
    371373                {
    372374                    /* 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,
    375380                                     VBOXGUEST_HGCM_CALL_PARMS(hgcmR0)[i].u.Pointer.size))
    376381                    {
     
    555560            {
    556561                /* communicate result to VMM, align at 4MB */
    557                 req->hypervisorStart    = (RTGCPTR)ALIGNP(hypervisorArea, 0x400000);
     562                req->hypervisorStart    = (vmmDevHypPtr)ALIGNP(hypervisorArea, 0x400000);
    558563                req->header.requestType = VMMDevReq_SetHypervisorInfo;
    559564                req->header.rc          = VERR_GENERAL_FAILURE;
Note: See TracChangeset for help on using the changeset viewer.

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