VirtualBox

Changeset 21225 in vbox


Ignore:
Timestamp:
Jul 5, 2009 3:20:41 PM (15 years ago)
Author:
vboxsync
Message:

Eliminated the VMMDEVHYP[PTR|PHYS]* types.

Location:
trunk
Files:
3 edited

Legend:

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

    r21223 r21225  
    4747 * @{
    4848 */
    49 
    50 /** @todo The following is a temporary fix for the problem of accessing
    51     hypervisor pointers from within guest additions */
    52 
    53 /** Hypervisor linear pointer size type.
    54  * @todo r=bird: only hypervisorStart is a "hypervisor" address, all other use
    55  *       is guest addresses...
    56  *   */
    57 typedef RTGCPTR32   VMMDEVHYPPTR32;
    58 /** Hypervisor linear pointer sized type.
    59  * @todo r=bird: This is never used for any "hypervisor" addresses, only guest
    60  *       addresses. */
    61 typedef RTGCPTR64   VMMDEVHYPPTR64;
    62 /** Hypervisor physical pointer sized type.
    63  * @todo r=bird: Same confusion as with VMMDEVHYPPTR64. */
    64 typedef RTGCPHYS32  VMMDEVHYPPHYS32;
    65 /** Hypervisor physical pointer sized type.
    66  * @todo r=bird: Same confusion as with VMMDEVHYPPTR64. */
    67 typedef RTGCPHYS64  VMMDEVHYPPHYS64;
    68 
    69 /** @def VMMDEVHYPPTR Hypervisor linear pointer sized type size type.
    70  * @todo r=bird: Same confusion as with VMMDEVHYPPTR64. */
    71 /** @def VMMDEVHYPPHYS Hypervisor physical pointer sized type.
    72  * @todo r=bird: Same confusion as with VMMDEVHYPPTR64. */
    73 #if defined(VBOX_WITH_64_BITS_GUESTS) && ARCH_BITS == 64
    74 # define VMMDEVHYPPTR   VMMDEVHYPPTR64
    75 # define VMMDEVHYPPHYS  VMMDEVHYPPHYS64
    76 # else
    77 # define VMMDEVHYPPTR   VMMDEVHYPPTR32
    78 # define VMMDEVHYPPHYS  VMMDEVHYPPHYS32
    79 #endif
    80 
    8149
    8250/** @name Mouse capability bits
     
    399367    /** guest virtual address of proposed hypervisor start */
    400368    /** TODO: Make this 64-bit compatible */
    401     VMMDEVHYPPTR32 hypervisorStart;
     369    RTGCPTR32 hypervisorStart;
    402370    /** hypervisor size in bytes */
    403371    uint32_t hypervisorSize;
     
    745713            union
    746714            {
    747                 VMMDEVHYPPHYS32 physAddr;
    748                 VMMDEVHYPPTR32  linearAddr;
     715                RTGCPHYS32 physAddr;
     716                RTGCPTR32  linearAddr;
    749717            } u;
    750718        } Pointer;
     
    788756        type                    = VMMDevHGCMParmType_LinAddr;
    789757        u.Pointer.size          = cb;
    790         u.Pointer.u.linearAddr  = (VMMDEVHYPPTR32)(uintptr_t)pv;
     758        u.Pointer.u.linearAddr  = (RTGCPTR32)(uintptr_t)pv;
    791759    }
    792760#endif
     
    806774            union
    807775            {
    808                 VMMDEVHYPPHYS64 physAddr;
    809                 VMMDEVHYPPTR64  linearAddr;
     776                RTGCPHYS64 physAddr;
     777                RTGCPTR64  linearAddr;
    810778            } u;
    811779        } Pointer;
     
    867835            union
    868836            {
    869                 VMMDEVHYPPHYS32 physAddr;
    870                 VMMDEVHYPPTR32  linearAddr;
     837                RTGCPHYS32 physAddr;
     838                RTGCPTR32  linearAddr;
    871839            } u;
    872840        } Pointer;
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r21219 r21225  
    13581358            {
    13591359                /* communicate result to VMM, align at 4MB */
    1360                 req->hypervisorStart    = (VMMDEVHYPPTR32)(uintptr_t)RT_ALIGN_P(hypervisorArea, 0x400000);
     1360                req->hypervisorStart    = (RTGCPTR32)(uintptr_t)RT_ALIGN_P(hypervisorArea, 0x400000);
    13611361                req->header.requestType = VMMDevReq_SetHypervisorInfo;
    13621362                req->header.rc          = VERR_GENERAL_FAILURE;
  • trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c

    r18508 r21225  
    330330    parms.pBuffer.type                   = VMMDevHGCMParmType_LinAddr_In;
    331331    parms.pBuffer.u.Pointer.size         = len;
    332     parms.pBuffer.u.Pointer.u.linearAddr = (VMMDEVHYPPTR) buf;
     332    parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) buf;
    333333
    334334    rc = crVBoxHGCMCall(&parms, sizeof(parms));
     
    353353    parms.pBuffer.type                   = VMMDevHGCMParmType_LinAddr_Out;
    354354    parms.pBuffer.u.Pointer.size         = conn->cbHostBufferAllocated;
    355     parms.pBuffer.u.Pointer.u.linearAddr = (VMMDEVHYPPTR) conn->pHostBuffer;
     355    parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) conn->pHostBuffer;
    356356
    357357    parms.cbBuffer.type      = VMMDevHGCMParmType_32bit;
     
    397397        parms.pBuffer.type                   = VMMDevHGCMParmType_LinAddr_In;
    398398        parms.pBuffer.u.Pointer.size         = len;
    399         parms.pBuffer.u.Pointer.u.linearAddr = (VMMDEVHYPPTR) buf;
    400     }
    401     /*else //@todo it fails badly, have to check why
     399        parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) buf;
     400    }
     401    /*else ///@todo it fails badly, have to check why. bird: This fails because buf isn't a physical address?
    402402    {
    403403        parms.pBuffer.type                 = VMMDevHGCMParmType_PhysAddr;
    404404        parms.pBuffer.u.Pointer.size       = len;
    405         parms.pBuffer.u.Pointer.u.physAddr = (VMMDEVHYPPHYS32) buf;
     405        parms.pBuffer.u.Pointer.u.physAddr = (uintptr_t) buf;
    406406    }*/
    407407
     
    409409    parms.pWriteback.type                   = VMMDevHGCMParmType_LinAddr_Out;
    410410    parms.pWriteback.u.Pointer.size         = conn->cbHostBufferAllocated;
    411     parms.pWriteback.u.Pointer.u.linearAddr = (VMMDEVHYPPTR) conn->pHostBuffer;
     411    parms.pWriteback.u.Pointer.u.linearAddr = (uintptr_t) conn->pHostBuffer;
    412412
    413413    parms.cbWriteback.type      = VMMDevHGCMParmType_32bit;
     
    514514    parms.pBuffer.type                   = VMMDevHGCMParmType_LinAddr_Out;
    515515    parms.pBuffer.u.Pointer.size         = conn->cbHostBufferAllocated;
    516     parms.pBuffer.u.Pointer.u.linearAddr = (VMMDEVHYPPTR) conn->pHostBuffer;
     516    parms.pBuffer.u.Pointer.u.linearAddr = (uintptr_t) conn->pHostBuffer;
    517517
    518518    parms.cbBuffer.type      = VMMDevHGCMParmType_32bit;
Note: See TracChangeset for help on using the changeset viewer.

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