VirtualBox

儲存庫 vbox 的更動 68654


忽略:
時間撮記:
2017-9-5 下午05:22:12 (7 年 以前)
作者:
vboxsync
訊息:

VBoxGuestR0Lib: Function prefix and DECL macro cleanups.

位置:
trunk
檔案:
修改 22 筆資料

圖例:

未更動
新增
刪除
  • trunk/include/VBox/VBoxGuestLib.h

    r68630 r68654  
    101101 * @return VBox status code.
    102102 */
    103 DECLR0VBGL(int) VbglInitPrimary(RTIOPORT portVMMDev, struct VMMDevMemory *pVMMDevMemory);
     103DECLR0VBGL(int)     VbglR0InitPrimary(RTIOPORT portVMMDev, struct VMMDevMemory *pVMMDevMemory);
    104104
    105105/**
     
    108108 * @author bird (2017-08-23)
    109109 */
    110 DECLR0VBGL(void) VbglR0TerminatePrimary(void);
     110DECLR0VBGL(void)    VbglR0TerminatePrimary(void);
    111111
    112112/**
     
    116116 * @return VBox status code.
    117117 */
    118 DECLR0VBGL(int) VbglR0InitClient(void);
     118DECLR0VBGL(int)     VbglR0InitClient(void);
    119119
    120120/**
    121121 * The library termination function.
    122122 */
    123 DECLR0VBGL(void) VbglR0TerminateClient(void);
     123DECLR0VBGL(void)    VbglR0TerminateClient(void);
    124124
    125125
     
    167167 */
    168168# if defined(___VBox_VMMDev_h) || defined(DOXYGEN_RUNNING)
    169 DECLVBGL(int) VbglGRAlloc(struct VMMDevRequestHeader **ppReq, size_t cbReq, VMMDevRequestType enmReqType);
     169DECLR0VBGL(int) VbglR0GRAlloc(struct VMMDevRequestHeader **ppReq, size_t cbReq, VMMDevRequestType enmReqType);
    170170# else
    171 DECLVBGL(int) VbglGRAlloc(struct VMMDevRequestHeader **ppReq, size_t cbReq, int32_t enmReqType);
     171DECLR0VBGL(int) VbglR0GRAlloc(struct VMMDevRequestHeader **ppReq, size_t cbReq, int32_t enmReqType);
    172172# endif
    173173
     
    179179 * @return VBox status code.
    180180 */
    181 DECLVBGL(int) VbglGRPerform(struct VMMDevRequestHeader *pReq);
     181DECLR0VBGL(int) VbglR0GRPerform(struct VMMDevRequestHeader *pReq);
    182182
    183183/**
     
    188188 * @return VBox status code.
    189189 */
    190 DECLVBGL(void) VbglGRFree(struct VMMDevRequestHeader *pReq);
     190DECLR0VBGL(void) VbglR0GRFree(struct VMMDevRequestHeader *pReq);
    191191
    192192/**
     
    200200 * @return VBox status code.
    201201 */
    202 DECLVBGL(int) VbglGRVerify(const struct VMMDevRequestHeader *pReq, size_t cbReq);
     202DECLR0VBGL(int) VbglGR0Verify(const struct VMMDevRequestHeader *pReq, size_t cbReq);
    203203
    204204/** @} */
     
    328328 * @return VBox status code.
    329329 */
    330 DECLVBGL(int) VbglR0HGCMInit(void);
     330DECLR0VBGL(int) VbglR0HGCMInit(void);
    331331
    332332/**
     
    335335 * @return VBox status code.
    336336 */
    337 DECLVBGL(int) VbglR0HGCMTerminate(void);
     337DECLR0VBGL(int) VbglR0HGCMTerminate(void);
    338338
    339339/**
     
    349349 * @todo consider baking the client Id into the handle.
    350350 */
    351 DECLVBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient);
     351DECLR0VBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient);
    352352
    353353/**
     
    361361 * @todo consider baking the client Id into the handle.
    362362 */
    363 DECLVBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient);
     363DECLR0VBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient);
    364364
    365365/**
     
    372372 * @return VBox status code.
    373373 */
    374 DECLVBGL(int) VbglR0HGCMCallRaw(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
     374DECLR0VBGL(int) VbglR0HGCMCallRaw(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
    375375
    376376/**
     
    384384 *         or the HGCM status code (pData->Hdr.rc).
    385385 */
    386 DECLVBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
     386DECLR0VBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
    387387
    388388/**
     
    396396 * @return VBox status code.
    397397 */
    398 DECLVBGL(int) VbglR0HGCMCallUserDataRaw(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
     398DECLR0VBGL(int) VbglR0HGCMCallUserDataRaw(VBGLHGCMHANDLE handle, struct VBGLIOCHGCMCALL*pData, uint32_t cbData);
    399399
    400400/** @} */
     
    403403 * @{ */
    404404typedef VBGLHGCMHANDLE VBGLCRCTLHANDLE;
    405 DECLVBGL(int) VbglR0CrCtlCreate(VBGLCRCTLHANDLE *phCtl);
    406 DECLVBGL(int) VbglR0CrCtlDestroy(VBGLCRCTLHANDLE hCtl);
    407 DECLVBGL(int) VbglR0CrCtlConConnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID *pidClient);
    408 DECLVBGL(int) VbglR0CrCtlConDisconnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID idClient);
     405DECLR0VBGL(int) VbglR0CrCtlCreate(VBGLCRCTLHANDLE *phCtl);
     406DECLR0VBGL(int) VbglR0CrCtlDestroy(VBGLCRCTLHANDLE hCtl);
     407DECLR0VBGL(int) VbglR0CrCtlConConnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID *pidClient);
     408DECLR0VBGL(int) VbglR0CrCtlConDisconnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID idClient);
    409409struct VBGLIOCHGCMCALL;
    410 DECLVBGL(int) VbglR0CrCtlConCallRaw(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
    411 DECLVBGL(int) VbglR0CrCtlConCall(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
    412 DECLVBGL(int) VbglR0CrCtlConCallUserDataRaw(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
     410DECLR0VBGL(int) VbglR0CrCtlConCallRaw(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
     411DECLR0VBGL(int) VbglR0CrCtlConCall(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
     412DECLR0VBGL(int) VbglR0CrCtlConCallUserDataRaw(VBGLCRCTLHANDLE hCtl, struct VBGLIOCHGCMCALL *pCallInfo, int cbCallInfo);
    413413/** @} */
    414414
     
    423423 * @returns VBox status code.
    424424 */
    425 DECLVBGL(int) VbglPhysHeapInit (void);
     425DECLR0VBGL(int)     VbglR0PhysHeapInit(void);
    426426
    427427/**
    428428 * Shutdown the heap.
    429429 */
    430 DECLVBGL(void) VbglPhysHeapTerminate (void);
     430DECLR0VBGL(void)    VbglR0PhysHeapTerminate(void);
    431431
    432432/**
     
    436436 * @param cbSize    Size of block to be allocated.
    437437 */
    438 DECLVBGL(void *) VbglPhysHeapAlloc (uint32_t cbSize);
     438DECLR0VBGL(void *)  VbglR0PhysHeapAlloc(uint32_t cbSize);
    439439
    440440/**
     
    450450 * @returns Physical address of the memory block.
    451451 */
    452 DECLVBGL(uint32_t)  VbglPhysHeapGetPhysAddr(void *pv);
     452DECLR0VBGL(uint32_t) VbglR0PhysHeapGetPhysAddr(void *pv);
    453453
    454454/**
     
    457457 * @param   pv    Virtual address of memory block.
    458458 */
    459 DECLVBGL(void)      VbglPhysHeapFree(void *pv);
    460 
    461 DECLVBGL(int)       VbglQueryVMMDevMemory(struct VMMDevMemory **ppVMMDevMemory);
     459DECLR0VBGL(void)    VbglR0PhysHeapFree(void *pv);
     460
     461DECLR0VBGL(int)     VbglR0QueryVMMDevMemory(struct VMMDevMemory **ppVMMDevMemory);
    462462DECLR0VBGL(bool)    VbglR0CanUsePhysPageList(void);
    463463
     
    465465/** @name Mouse
    466466 * @{ */
    467 DECLVBGL(int)       VbglSetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser);
    468 DECLVBGL(int)       VbglGetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
    469 DECLVBGL(int)       VbglSetMouseStatus(uint32_t fFeatures);
     467DECLR0VBGL(int)     VbglR0SetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser);
     468DECLR0VBGL(int)     VbglR0GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py);
     469DECLR0VBGL(int)     VbglR0SetMouseStatus(uint32_t fFeatures);
    470470/** @}  */
    471471# endif /* VBOX_GUEST */
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/common/VBoxMPUtils.cpp

    r68630 r68654  
    9393    VMMDevGetHeightReductionRequest *req = NULL;
    9494
    95     rc = VbglGRAlloc((VMMDevRequestHeader**)&req, sizeof(VMMDevGetHeightReductionRequest), VMMDevReq_GetHeightReduction);
     95    rc = VbglR0GRAlloc((VMMDevRequestHeader**)&req, sizeof(VMMDevGetHeightReductionRequest), VMMDevReq_GetHeightReduction);
    9696    if (RT_FAILURE(rc))
    9797    {
     
    100100    else
    101101    {
    102         rc = VbglGRPerform(&req->header);
     102        rc = VbglR0GRPerform(&req->header);
    103103        if (RT_SUCCESS(rc))
    104104        {
     
    109109            WARN(("ERROR querying height reduction value from VMMDev. rc = %#xrc", rc));
    110110        }
    111         VbglGRFree(&req->header);
     111        VbglR0GRFree(&req->header);
    112112    }
    113113
     
    122122    VMMDevVideoModeSupportedRequest2 *req2 = NULL;
    123123
    124     int rc = VbglGRAlloc((VMMDevRequestHeader**)&req2, sizeof(VMMDevVideoModeSupportedRequest2), VMMDevReq_VideoModeSupported2);
     124    int rc = VbglR0GRAlloc((VMMDevRequestHeader**)&req2, sizeof(VMMDevVideoModeSupportedRequest2), VMMDevReq_VideoModeSupported2);
    125125    if (RT_FAILURE(rc))
    126126    {
     
    137137        req2->height = height;
    138138        req2->bpp    = bpp;
    139         rc = VbglGRPerform(&req2->header);
     139        rc = VbglR0GRPerform(&req2->header);
    140140        if (RT_SUCCESS(rc))
    141141        {
     
    157157            req->bpp    = bpp;
    158158
    159             rc = VbglGRPerform(&req->header);
     159            rc = VbglR0GRPerform(&req->header);
    160160            if (RT_SUCCESS(rc))
    161161            {
     
    167167            }
    168168        }
    169         VbglGRFree(&req2->header);
     169        VbglR0GRFree(&req2->header);
    170170    }
    171171
     
    182182    LOGF_ENTER();
    183183
    184     int rc = VbglGRAlloc ((VMMDevRequestHeader **)&req, sizeof (VMMDevDisplayChangeRequest2), VMMDevReq_GetDisplayChangeRequest2);
     184    int rc = VbglR0GRAlloc ((VMMDevRequestHeader **)&req, sizeof (VMMDevDisplayChangeRequest2), VMMDevReq_GetDisplayChangeRequest2);
    185185
    186186    if (RT_FAILURE(rc))
     
    192192        req->eventAck = 0;
    193193
    194         rc = VbglGRPerform (&req->header);
     194        rc = VbglR0GRPerform (&req->header);
    195195
    196196        if (RT_SUCCESS(rc))
     
    212212        }
    213213
    214         VbglGRFree (&req->header);
     214        VbglR0GRFree (&req->header);
    215215    }
    216216
     
    225225    VMMDevReqMouseStatus *req = NULL;
    226226
    227     int rc = VbglGRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_GetMouseStatus);
     227    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_GetMouseStatus);
    228228
    229229    if (RT_FAILURE(rc))
     
    233233    else
    234234    {
    235         rc = VbglGRPerform(&req->header);
     235        rc = VbglR0GRPerform(&req->header);
    236236
    237237        if (RT_SUCCESS(rc))
     
    257257        }
    258258
    259         VbglGRFree(&req->header);
     259        VbglR0GRFree(&req->header);
    260260    }
    261261
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp

    r68630 r68654  
    46024602                    VMMDevVideoSetVisibleRegion *req = NULL;
    46034603
    4604                     rc = VbglGRAlloc ((VMMDevRequestHeader **)&req,
     4604                    rc = VbglR0GRAlloc ((VMMDevRequestHeader **)&req,
    46054605                                      sizeof (VMMDevVideoSetVisibleRegion) + (cRects-1)*sizeof(RTRECT),
    46064606                                      VMMDevReq_VideoSetVisibleRegion);
     
    46114611                        memcpy(&req->Rect, pRect, cRects*sizeof(RTRECT));
    46124612
    4613                         rc = VbglGRPerform (&req->header);
     4613                        rc = VbglR0GRPerform (&req->header);
    46144614                        AssertRC(rc);
    46154615                        if (RT_SUCCESS(rc))
     
    46174617                        else
    46184618                        {
    4619                             WARN(("VbglGRPerform failed rc (%d)", rc));
     4619                            WARN(("VbglR0GRPerform failed rc (%d)", rc));
    46204620                            Status = STATUS_UNSUCCESSFUL;
    46214621                        }
     
    46234623                    else
    46244624                    {
    4625                         WARN(("VbglGRAlloc failed rc (%d)", rc));
     4625                        WARN(("VbglR0GRAlloc failed rc (%d)", rc));
    46264626                        Status = STATUS_UNSUCCESSFUL;
    46274627                    }
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPDriver.cpp

    r68550 r68654  
    665665        if (pExt->u.primary.pvReqFlush != NULL)
    666666        {
    667             VbglGRFree((VMMDevRequestHeader *)pExt->u.primary.pvReqFlush);
     667            VbglR0GRFree((VMMDevRequestHeader *)pExt->u.primary.pvReqFlush);
    668668            pExt->u.primary.pvReqFlush = NULL;
    669669        }
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPIOCTL.cpp

    r66507 r68654  
    465465
    466466    VMMDevVideoSetVisibleRegion *req = NULL;
    467     rc = VbglGRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevVideoSetVisibleRegion) + (cRects-1)*sizeof(RTRECT),
     467    rc = VbglR0GRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevVideoSetVisibleRegion) + (cRects-1)*sizeof(RTRECT),
    468468                      VMMDevReq_VideoSetVisibleRegion);
    469469
     
    472472        req->cRect = cRects;
    473473        memcpy(&req->Rect, pRects, cRects*sizeof(RTRECT));
    474         rc = VbglGRPerform(&req->header);
     474        rc = VbglR0GRPerform(&req->header);
    475475
    476476        if (RT_SUCCESS(rc))
     
    479479        }
    480480
    481         VbglGRFree(&req->header);
    482     }
    483     else
    484     {
    485         WARN(("VbglGRAlloc rc = %#xrc", rc));
     481        VbglR0GRFree(&req->header);
     482    }
     483    else
     484    {
     485        WARN(("VbglR0GRAlloc rc = %#xrc", rc));
    486486    }
    487487
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/xpdm/VBoxMPInternal.cpp

    r65381 r68654  
    201201        if (req)
    202202        {
    203             int rc = VbglGRPerform (&req->header);
     203            int rc = VbglR0GRPerform (&req->header);
    204204
    205205            if (RT_FAILURE(rc))
     
    219219    VMMDevMemory *pVMMDevMemory = NULL;
    220220
    221     rc = VbglQueryVMMDevMemory (&pVMMDevMemory);
     221    rc = VbglR0QueryVMMDevMemory(&pVMMDevMemory);
    222222    if (RT_FAILURE(rc))
    223223    {
    224         WARN(("VbglQueryVMMDevMemory rc = %#xrc", rc));
     224        WARN(("VbglR0QueryVMMDevMemory rc = %#xrc", rc));
    225225        LOGF_LEAVE();
    226226        return rc;
     
    252252        VMMDevVideoAccelFlush *req = NULL;
    253253
    254         rc = VbglGRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevVideoAccelFlush), VMMDevReq_VideoAccelFlush);
     254        rc = VbglR0GRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevVideoAccelFlush), VMMDevReq_VideoAccelFlush);
    255255
    256256        if (RT_SUCCESS(rc))
     
    260260        else
    261261        {
    262             WARN(("VbglGRAlloc(VMMDevVideoAccelFlush) rc = %#xrc", rc));
     262            WARN(("VbglR0GRAlloc(VMMDevVideoAccelFlush) rc = %#xrc", rc));
    263263            LOGF_LEAVE();
    264264            return rc;
     
    269269
    270270    VMMDevVideoAccelEnable *req = NULL;
    271     rc = VbglGRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevVideoAccelEnable), VMMDevReq_VideoAccelEnable);
     271    rc = VbglR0GRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevVideoAccelEnable), VMMDevReq_VideoAccelEnable);
    272272
    273273    if (RT_SUCCESS(rc))
     
    277277        req->fu32Status   = 0;
    278278
    279         rc = VbglGRPerform(&req->header);
     279        rc = VbglR0GRPerform(&req->header);
    280280        if (RT_SUCCESS(rc))
    281281        {
     
    306306                req->fu32Status = 0;
    307307
    308                 VbglGRPerform(&req->header);
     308                VbglR0GRPerform(&req->header);
    309309
    310310                rc = VERR_NOT_SUPPORTED;
     
    316316        }
    317317
    318         VbglGRFree(&req->header);
     318        VbglR0GRFree(&req->header);
    319319    }
    320320    else
    321321    {
    322         WARN(("VbglGRAlloc(VMMDevVideoAccelEnable) rc = %#xrc", rc));
     322        WARN(("VbglR0GRAlloc(VMMDevVideoAccelEnable) rc = %#xrc", rc));
    323323    }
    324324
  • trunk/src/VBox/Additions/WINNT/Mouse/NT4/VBoxPS2NT.cpp

    r68636 r68654  
    14651465                    if (pReq)
    14661466                    {
    1467                         int rc = VbglGRPerform (&pReq->header);
     1467                        int rc = VbglR0GRPerform (&pReq->header);
    14681468                        if (RT_SUCCESS(rc))
    14691469                        {
     
    15071507                if (pReq)
    15081508                {
    1509                     int rc = VbglGRPerform(&pReq->header);
     1509                    int rc = VbglR0GRPerform(&pReq->header);
    15101510                    if (RT_SUCCESS(rc))
    15111511                    {
     
    21422142        VMMDevReqMouseStatus *pReq = NULL;
    21432143
    2144         rcVBox = VbglGRAlloc((VMMDevRequestHeader**)&pReq, sizeof(VMMDevReqMouseStatus), VMMDevReq_SetMouseStatus);
     2144        rcVBox = VbglR0GRAlloc((VMMDevRequestHeader**)&pReq, sizeof(VMMDevReqMouseStatus), VMMDevReq_SetMouseStatus);
    21452145        if (RT_SUCCESS(rcVBox))
    21462146        {
     
    21492149            pReq->pointerXPos = 0;
    21502150            pReq->pointerYPos = 0;
    2151             rcVBox = VbglGRPerform(&pReq->header);
     2151            rcVBox = VbglR0GRPerform(&pReq->header);
    21522152            if (RT_FAILURE(rcVBox))
    21532153                Log(("VBoxMouseNT::DriverEntry: ERROR communicating new mouse capabilities to VMMDev. rc = %Rrc\n", rcVBox));
  • trunk/src/VBox/Additions/WINNT/Mouse/NT5/VBoxMFInternal.cpp

    r68633 r68654  
    111111    if (g_ctx.fIsNewProtEnabled)
    112112        return true;
    113     int rc = VbglSetMouseNotifyCallback(vboxNewProtMouseEventCb, NULL);
     113    int rc = VbglR0SetMouseNotifyCallback(vboxNewProtMouseEventCb, NULL);
    114114    if (RT_SUCCESS(rc))
    115115    {
     
    118118        return true;
    119119    }
    120     WARN(("VbglSetMouseNotifyCallback failed: %Rrc", rc));
     120    WARN(("VbglR0SetMouseNotifyCallback failed: %Rrc", rc));
    121121    return false;
    122122}
     
    133133    {
    134134        g_ctx.fIsNewProtEnabled = false;
    135         int rc = VbglSetMouseNotifyCallback(NULL, NULL);
     135        int rc = VbglR0SetMouseNotifyCallback(NULL, NULL);
    136136        if (RT_FAILURE(rc))
    137             WARN(("VbglSetMouseNotifyCallback failed: %Rrc", rc));
     137            WARN(("VbglR0SetMouseNotifyCallback failed: %Rrc", rc));
    138138    }
    139139}
     
    202202    if (pDevExt->pSCReq)
    203203    {
    204         int rc = VbglGRPerform(&pDevExt->pSCReq->header);
     204        int rc = VbglR0GRPerform(&pDevExt->pSCReq->header);
    205205        if (RT_SUCCESS(rc))
    206206        {
     
    225225        else
    226226        {
    227             WARN(("VbglGRPerform failed with rc=%Rrc", rc));
     227            WARN(("VbglR0GRPerform failed with rc=%Rrc", rc));
    228228        }
    229229    }
     
    380380        {
    381381            VMMDevReqMouseStatus *req = NULL;
    382             int rc = VbglGRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_SetMouseStatus);
     382            int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_SetMouseStatus);
    383383            if (RT_SUCCESS(rc))
    384384            {
     
    390390                req->pointerYPos = 0;
    391391
    392                 rc = VbglGRPerform(&req->header);
     392                rc = VbglR0GRPerform(&req->header);
    393393                if (RT_SUCCESS(rc))
    394394                    InterlockedExchange(&g_ctx.fHostInformed, TRUE);
    395395                else
    396                     WARN(("VbglGRPerform failed with rc=%Rrc", rc));
    397 
    398                 VbglGRFree(&req->header);
     396                    WARN(("VbglR0GRPerform failed with rc=%Rrc", rc));
     397
     398                VbglR0GRFree(&req->header);
    399399            }
    400400            else
    401                 WARN(("VbglGRAlloc failed with rc=%Rrc", rc));
     401                WARN(("VbglR0GRAlloc failed with rc=%Rrc", rc));
    402402        }
    403403
     
    406406        {
    407407            VMMDevReqMouseStatus *req = NULL;
    408             int rc = VbglGRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_GetMouseStatus);
     408            int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_GetMouseStatus);
    409409            if (RT_SUCCESS(rc))
    410410                InterlockedExchangePointer((PVOID volatile *)&pDevExt->pSCReq, req);
    411411            else
    412412            {
    413                 WARN(("VbglGRAlloc for service callback failed with rc=%Rrc", rc));
     413                WARN(("VbglR0GRAlloc for service callback failed with rc=%Rrc", rc));
    414414            }
    415415        }
     
    430430    {
    431431        VMMDevReqMouseStatus *req = NULL;
    432         int rc = VbglGRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_SetMouseStatus);
     432        int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&req, sizeof(VMMDevReqMouseStatus), VMMDevReq_SetMouseStatus);
    433433        if (RT_SUCCESS(rc))
    434434        {
     
    437437            req->pointerYPos = 0;
    438438
    439             rc = VbglGRPerform(&req->header);
     439            rc = VbglR0GRPerform(&req->header);
    440440            if (RT_FAILURE(rc))
    441                 WARN(("VbglGRPerform failed with rc=%Rrc", rc));
    442 
    443             VbglGRFree(&req->header);
     441                WARN(("VbglR0GRPerform failed with rc=%Rrc", rc));
     442
     443            VbglR0GRFree(&req->header);
    444444        }
    445445        else
    446             WARN(("VbglGRAlloc failed with rc=%Rrc", rc));
     446            WARN(("VbglR0GRAlloc failed with rc=%Rrc", rc));
    447447
    448448        InterlockedExchange(&g_ctx.fHostInformed, FALSE);
     
    464464    KeReleaseSpinLock(&g_ctx.SyncLock, Irql);
    465465    if (pSCReq)
    466         VbglGRFree(&pSCReq->header);
     466        VbglR0GRFree(&pSCReq->header);
    467467
    468468    /*
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c

    r68589 r68654  
    441441static int __init vgdrvLinuxCreateInputDevice(void)
    442442{
    443     int rc = VbglGRAlloc((VMMDevRequestHeader **)&g_pMouseStatusReq, sizeof(*g_pMouseStatusReq), VMMDevReq_GetMouseStatus);
     443    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&g_pMouseStatusReq, sizeof(*g_pMouseStatusReq), VMMDevReq_GetMouseStatus);
    444444    if (RT_SUCCESS(rc))
    445445    {
     
    479479        else
    480480            rc = -ENOMEM;
    481         VbglGRFree(&g_pMouseStatusReq->header);
     481        VbglR0GRFree(&g_pMouseStatusReq->header);
    482482        g_pMouseStatusReq = NULL;
    483483    }
     
    493493static void vgdrvLinuxTermInputDevice(void)
    494494{
    495     VbglGRFree(&g_pMouseStatusReq->header);
     495    VbglR0GRFree(&g_pMouseStatusReq->header);
    496496    g_pMouseStatusReq = NULL;
    497497
     
    10311031    g_pMouseStatusReq->pointerXPos = 0;
    10321032    g_pMouseStatusReq->pointerYPos = 0;
    1033     rc = VbglGRPerform(&g_pMouseStatusReq->header);
     1033    rc = VbglR0GRPerform(&g_pMouseStatusReq->header);
    10341034    if (RT_SUCCESS(rc))
    10351035    {
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win-pnp.cpp

    r62853 r68654  
    486486                            /* Tell the VMM that we no longer support mouse pointer integration. */
    487487                            VMMDevReqMouseStatus *pReq = NULL;
    488                             int vrc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof (VMMDevReqMouseStatus),
     488                            int vrc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof (VMMDevReqMouseStatus),
    489489                                                  VMMDevReq_SetMouseStatus);
    490490                            if (RT_SUCCESS(vrc))
     
    494494                                pReq->pointerYPos = 0;
    495495
    496                                 vrc = VbglGRPerform(&pReq->header);
     496                                vrc = VbglR0GRPerform(&pReq->header);
    497497                                if (RT_FAILURE(vrc))
    498498                                {
     
    500500                                }
    501501
    502                                 VbglGRFree(&pReq->header);
     502                                VbglR0GRFree(&pReq->header);
    503503                            }
    504504
     
    523523                                    pReq->powerState = VMMDevPowerState_PowerOff;
    524524
    525                                     vrc = VbglGRPerform(&pReq->header);
     525                                    vrc = VbglR0GRPerform(&pReq->header);
    526526                                }
    527527                                if (RT_FAILURE(vrc))
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-win.cpp

    r68554 r68654  
    451451    if (NT_SUCCESS(rcNt))
    452452    {
    453         int vrc = VbglGRAlloc((VMMDevRequestHeader **)&pDevExt->pPowerStateRequest,
     453        int vrc = VbglR0GRAlloc((VMMDevRequestHeader **)&pDevExt->pPowerStateRequest,
    454454                              sizeof(VMMDevPowerStateRequest), VMMDevReq_SetPowerStatus);
    455455        if (RT_FAILURE(vrc))
     
    942942        pReq->powerState = VMMDevPowerState_PowerOff;
    943943
    944         int rc = VbglGRPerform(&pReq->header);
     944        int rc = VbglR0GRPerform(&pReq->header);
    945945        if (RT_FAILURE(rc))
    946946            LogFunc(("Error performing request to VMMDev, rc=%Rrc\n", rc));
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp

    r68638 r68654  
    152152     */
    153153    VMMDevReqHypervisorInfo *pReq;
    154     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevReqHypervisorInfo), VMMDevReq_GetHypervisorInfo);
     154    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevReqHypervisorInfo), VMMDevReq_GetHypervisorInfo);
    155155    if (RT_FAILURE(rc))
    156156        return rc;
    157157    pReq->hypervisorStart = 0;
    158158    pReq->hypervisorSize  = 0;
    159     rc = VbglGRPerform(&pReq->header);
     159    rc = VbglR0GRPerform(&pReq->header);
    160160    if (RT_FAILURE(rc)) /* this shouldn't happen! */
    161161    {
    162         VbglGRFree(&pReq->header);
     162        VbglR0GRFree(&pReq->header);
    163163        return rc;
    164164    }
     
    242242            AssertMsg(RT_ALIGN_32(pReq->hypervisorStart, _4M) == pReq->hypervisorStart, ("%#x\n", pReq->hypervisorStart));
    243243
    244             rc = VbglGRPerform(&pReq->header);
     244            rc = VbglR0GRPerform(&pReq->header);
    245245            if (RT_SUCCESS(rc))
    246246            {
     
    266266            LogRel(("VBoxGuest: Warning: failed to reserve %#d of memory for guest mappings.\n", cbHypervisor));
    267267    }
    268     VbglGRFree(&pReq->header);
     268    VbglR0GRFree(&pReq->header);
    269269
    270270    /*
     
    289289         */
    290290        VMMDevReqHypervisorInfo *pReq;
    291         int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevReqHypervisorInfo), VMMDevReq_SetHypervisorInfo);
     291        int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevReqHypervisorInfo), VMMDevReq_SetHypervisorInfo);
    292292        if (RT_SUCCESS(rc))
    293293        {
    294294            pReq->hypervisorStart = 0;
    295295            pReq->hypervisorSize  = 0;
    296             rc = VbglGRPerform(&pReq->header);
    297             VbglGRFree(&pReq->header);
     296            rc = VbglR0GRPerform(&pReq->header);
     297            VbglR0GRFree(&pReq->header);
    298298        }
    299299        if (RT_SUCCESS(rc))
     
    324324    VMMDevReportGuestInfo2 *pReqInfo2 = NULL;
    325325    VMMDevReportGuestInfo  *pReqInfo1 = NULL;
    326     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReqInfo2, sizeof (VMMDevReportGuestInfo2), VMMDevReq_ReportGuestInfo2);
    327     Log(("vgdrvReportGuestInfo: VbglGRAlloc VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc));
     326    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReqInfo2, sizeof (VMMDevReportGuestInfo2), VMMDevReq_ReportGuestInfo2);
     327    Log(("vgdrvReportGuestInfo: VbglR0GRAlloc VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc));
    328328    if (RT_SUCCESS(rc))
    329329    {
     
    335335        RTStrCopy(pReqInfo2->guestInfo.szName, sizeof(pReqInfo2->guestInfo.szName), VBOX_VERSION_STRING);
    336336
    337         rc = VbglGRAlloc((VMMDevRequestHeader **)&pReqInfo1, sizeof (VMMDevReportGuestInfo), VMMDevReq_ReportGuestInfo);
    338         Log(("vgdrvReportGuestInfo: VbglGRAlloc VMMDevReportGuestInfo completed with rc=%Rrc\n", rc));
     337        rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReqInfo1, sizeof (VMMDevReportGuestInfo), VMMDevReq_ReportGuestInfo);
     338        Log(("vgdrvReportGuestInfo: VbglR0GRAlloc VMMDevReportGuestInfo completed with rc=%Rrc\n", rc));
    339339        if (RT_SUCCESS(rc))
    340340        {
     
    350350             * if not supported by the VMMDev (message ordering requirement).
    351351             */
    352             rc = VbglGRPerform(&pReqInfo2->header);
    353             Log(("vgdrvReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc));
     352            rc = VbglR0GRPerform(&pReqInfo2->header);
     353            Log(("vgdrvReportGuestInfo: VbglR0GRPerform VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc));
    354354            if (RT_SUCCESS(rc))
    355355            {
    356                 rc = VbglGRPerform(&pReqInfo1->header);
    357                 Log(("vgdrvReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo completed with rc=%Rrc\n", rc));
     356                rc = VbglR0GRPerform(&pReqInfo1->header);
     357                Log(("vgdrvReportGuestInfo: VbglR0GRPerform VMMDevReportGuestInfo completed with rc=%Rrc\n", rc));
    358358            }
    359359            else if (   rc == VERR_NOT_SUPPORTED
    360360                     || rc == VERR_NOT_IMPLEMENTED)
    361361            {
    362                 rc = VbglGRPerform(&pReqInfo1->header);
    363                 Log(("vgdrvReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo completed with rc=%Rrc\n", rc));
     362                rc = VbglR0GRPerform(&pReqInfo1->header);
     363                Log(("vgdrvReportGuestInfo: VbglR0GRPerform VMMDevReportGuestInfo completed with rc=%Rrc\n", rc));
    364364                if (RT_SUCCESS(rc))
    365365                {
    366                     rc = VbglGRPerform(&pReqInfo2->header);
    367                     Log(("vgdrvReportGuestInfo: VbglGRPerform VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc));
     366                    rc = VbglR0GRPerform(&pReqInfo2->header);
     367                    Log(("vgdrvReportGuestInfo: VbglR0GRPerform VMMDevReportGuestInfo2 completed with rc=%Rrc\n", rc));
    368368                    if (rc == VERR_NOT_IMPLEMENTED)
    369369                        rc = VINF_SUCCESS;
    370370                }
    371371            }
    372             VbglGRFree(&pReqInfo1->header);
    373         }
    374         VbglGRFree(&pReqInfo2->header);
     372            VbglR0GRFree(&pReqInfo1->header);
     373        }
     374        VbglR0GRFree(&pReqInfo2->header);
    375375    }
    376376
     
    391391     */
    392392    VMMDevReportGuestStatus *pReq2 = NULL;
    393     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq2, sizeof(*pReq2), VMMDevReq_ReportGuestStatus);
    394     Log(("vgdrvReportDriverStatus: VbglGRAlloc VMMDevReportGuestStatus completed with rc=%Rrc\n", rc));
     393    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq2, sizeof(*pReq2), VMMDevReq_ReportGuestStatus);
     394    Log(("vgdrvReportDriverStatus: VbglR0GRAlloc VMMDevReportGuestStatus completed with rc=%Rrc\n", rc));
    395395    if (RT_SUCCESS(rc))
    396396    {
     
    400400                                  : VBoxGuestFacilityStatus_Inactive;
    401401        pReq2->guestStatus.flags = 0;
    402         rc = VbglGRPerform(&pReq2->header);
    403         Log(("vgdrvReportDriverStatus: VbglGRPerform VMMDevReportGuestStatus completed with fActive=%d, rc=%Rrc\n",
     402        rc = VbglR0GRPerform(&pReq2->header);
     403        Log(("vgdrvReportDriverStatus: VbglR0GRPerform VMMDevReportGuestStatus completed with fActive=%d, rc=%Rrc\n",
    404404             fActive ? 1 : 0, rc));
    405405        if (rc == VERR_NOT_IMPLEMENTED) /* Compatibility with older hosts. */
    406406            rc = VINF_SUCCESS;
    407         VbglGRFree(&pReq2->header);
     407        VbglR0GRFree(&pReq2->header);
    408408    }
    409409
     
    440440    pReq->cPages = VMMDEV_MEMORY_BALLOON_CHUNK_PAGES;
    441441
    442     rc = VbglGRPerform(&pReq->header);
     442    rc = VbglR0GRPerform(&pReq->header);
    443443    if (RT_FAILURE(rc))
    444         LogRel(("vgdrvBalloonInflate: VbglGRPerform failed. rc=%Rrc\n", rc));
     444        LogRel(("vgdrvBalloonInflate: VbglR0GRPerform failed. rc=%Rrc\n", rc));
    445445    return rc;
    446446}
     
    472472    pReq->cPages = VMMDEV_MEMORY_BALLOON_CHUNK_PAGES;
    473473
    474     rc = VbglGRPerform(&pReq->header);
     474    rc = VbglR0GRPerform(&pReq->header);
    475475    if (RT_FAILURE(rc))
    476476    {
    477         LogRel(("vgdrvBalloonDeflate: VbglGRPerform failed. rc=%Rrc\n", rc));
     477        LogRel(("vgdrvBalloonDeflate: VbglR0GRPerform failed. rc=%Rrc\n", rc));
    478478        return rc;
    479479    }
     
    532532        }
    533533
    534         rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, g_cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon);
     534        rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, g_cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon);
    535535        if (RT_FAILURE(rc))
    536536            return rc;
     
    585585        }
    586586
    587         VbglGRFree(&pReq->header);
     587        VbglR0GRFree(&pReq->header);
    588588    }
    589589
     
    681681     * Try inflate / default the balloon as requested.
    682682     */
    683     rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, g_cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon);
     683    rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, g_cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon);
    684684    if (RT_FAILURE(rc))
    685685        return rc;
     
    711711    }
    712712
    713     VbglGRFree(&pReq->header);
     713    VbglR0GRFree(&pReq->header);
    714714    return rc;
    715715}
     
    734734        {
    735735            VMMDevChangeMemBalloon *pReq;
    736             int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, g_cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon);
     736            int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, g_cbChangeMemBalloonReq, VMMDevReq_ChangeMemBalloon);
    737737            if (RT_SUCCESS(rc))
    738738            {
     
    750750                    pDevExt->MemBalloon.cChunks--;
    751751                }
    752                 VbglGRFree(&pReq->header);
     752                VbglR0GRFree(&pReq->header);
    753753            }
    754754            else
     
    782782    if (pDevExt->pReqGuestHeartbeat)
    783783    {
    784         rc = VbglGRPerform(pDevExt->pReqGuestHeartbeat);
    785         Log3(("vgdrvHeartbeatSend: VbglGRPerform vgdrvHeartbeatSend completed with rc=%Rrc\n", rc));
     784        rc = VbglR0GRPerform(pDevExt->pReqGuestHeartbeat);
     785        Log3(("vgdrvHeartbeatSend: VbglR0GRPerform vgdrvHeartbeatSend completed with rc=%Rrc\n", rc));
    786786    }
    787787    else
     
    819819{
    820820    VMMDevReqHeartbeat *pReq;
    821     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_HeartbeatConfigure);
    822     Log(("vgdrvHeartbeatHostConfigure: VbglGRAlloc vgdrvHeartbeatHostConfigure completed with rc=%Rrc\n", rc));
     821    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_HeartbeatConfigure);
     822    Log(("vgdrvHeartbeatHostConfigure: VbglR0GRAlloc vgdrvHeartbeatHostConfigure completed with rc=%Rrc\n", rc));
    823823    if (RT_SUCCESS(rc))
    824824    {
    825825        pReq->fEnabled = fEnabled;
    826826        pReq->cNsInterval = 0;
    827         rc = VbglGRPerform(&pReq->header);
    828         Log(("vgdrvHeartbeatHostConfigure: VbglGRPerform vgdrvHeartbeatHostConfigure completed with rc=%Rrc\n", rc));
     827        rc = VbglR0GRPerform(&pReq->header);
     828        Log(("vgdrvHeartbeatHostConfigure: VbglR0GRPerform vgdrvHeartbeatHostConfigure completed with rc=%Rrc\n", rc));
    829829        pDevExt->cNsHeartbeatInterval = pReq->cNsInterval;
    830         VbglGRFree(&pReq->header);
     830        VbglR0GRFree(&pReq->header);
    831831    }
    832832    return rc;
     
    855855            /*
    856856             * Preallocate the request to use it from the timer callback because:
    857              *    1) on Windows VbglGRAlloc must be called at IRQL <= APC_LEVEL
     857             *    1) on Windows VbglR0GRAlloc must be called at IRQL <= APC_LEVEL
    858858             *       and the timer callback runs at DISPATCH_LEVEL;
    859859             *    2) avoid repeated allocations.
    860860             */
    861             rc = VbglGRAlloc(&pDevExt->pReqGuestHeartbeat, sizeof(*pDevExt->pReqGuestHeartbeat), VMMDevReq_GuestHeartbeat);
     861            rc = VbglR0GRAlloc(&pDevExt->pReqGuestHeartbeat, sizeof(*pDevExt->pReqGuestHeartbeat), VMMDevReq_GuestHeartbeat);
    862862            if (RT_SUCCESS(rc))
    863863            {
     
    877877                    LogRel(("vgdrvHeartbeatInit: Failed to create heartbeat timer: %Rrc\n", rc));
    878878
    879                 VbglGRFree(pDevExt->pReqGuestHeartbeat);
     879                VbglR0GRFree(pDevExt->pReqGuestHeartbeat);
    880880                pDevExt->pReqGuestHeartbeat = NULL;
    881881            }
    882882            else
    883                 LogRel(("vgdrvHeartbeatInit: VbglGRAlloc(VMMDevReq_GuestHeartbeat): %Rrc\n", rc));
     883                LogRel(("vgdrvHeartbeatInit: VbglR0GRAlloc(VMMDevReq_GuestHeartbeat): %Rrc\n", rc));
    884884
    885885            LogRel(("vgdrvHeartbeatInit: Failed to set up the timer, guest heartbeat is disabled\n"));
     
    10631063     * made by the VMM.
    10641064     */
    1065     rc = VbglInitPrimary(pDevExt->IOPortBase, (VMMDevMemory *)pDevExt->pVMMDevMemory);
     1065    rc = VbglR0InitPrimary(pDevExt->IOPortBase, (VMMDevMemory *)pDevExt->pVMMDevMemory);
    10661066    if (RT_SUCCESS(rc))
    10671067    {
    1068         rc = VbglGRAlloc((VMMDevRequestHeader **)&pDevExt->pIrqAckEvents, sizeof(VMMDevEvents), VMMDevReq_AcknowledgeEvents);
     1068        rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pDevExt->pIrqAckEvents, sizeof(VMMDevEvents), VMMDevReq_AcknowledgeEvents);
    10691069        if (RT_SUCCESS(rc))
    10701070        {
    1071             pDevExt->PhysIrqAckEvents = VbglPhysHeapGetPhysAddr(pDevExt->pIrqAckEvents);
     1071            pDevExt->PhysIrqAckEvents = VbglR0PhysHeapGetPhysAddr(pDevExt->pIrqAckEvents);
    10721072            Assert(pDevExt->PhysIrqAckEvents != 0);
    10731073
     
    11131113            }
    11141114            else
    1115                 LogRel(("VGDrvCommonInitDevExt: VBoxReportGuestInfo failed: rc=%Rrc\n", rc));
    1116             VbglGRFree((VMMDevRequestHeader *)pDevExt->pIrqAckEvents);
     1115                LogRel(("VGDrvCommonInitDevExt: vgdrvReportGuestInfo failed: rc=%Rrc\n", rc));
     1116            VbglR0GRFree((VMMDevRequestHeader *)pDevExt->pIrqAckEvents);
    11171117        }
    11181118        else
    1119             LogRel(("VGDrvCommonInitDevExt: VBoxGRAlloc failed: rc=%Rrc\n", rc));
     1119            LogRel(("VGDrvCommonInitDevExt: VbglR0GRAlloc failed: rc=%Rrc\n", rc));
    11201120
    11211121        VbglR0TerminatePrimary();
    11221122    }
    11231123    else
    1124         LogRel(("VGDrvCommonInitDevExt: VbglInit failed: rc=%Rrc\n", rc));
     1124        LogRel(("VGDrvCommonInitDevExt: VbglR0InitPrimary failed: rc=%Rrc\n", rc));
    11251125
    11261126    rc2 = RTSemFastMutexDestroy(pDevExt->MemBalloon.hMtx); AssertRC(rc2);
     
    11801180    }
    11811181
    1182     VbglGRFree(pDevExt->pReqGuestHeartbeat);
     1182    VbglR0GRFree(pDevExt->pReqGuestHeartbeat);
    11831183    pDevExt->pReqGuestHeartbeat = NULL;
    11841184
     
    20922092        return VERR_INVALID_PARAMETER;
    20932093    }
    2094     rc = VbglGRVerify(pReqHdr, cbData);
     2094    rc = VbglGR0Verify(pReqHdr, cbData);
    20952095    if (RT_FAILURE(rc))
    20962096    {
     
    21142114     * it does makes things a bit simpler wrt to phys address.)
    21152115     */
    2116     rc = VbglGRAlloc(&pReqCopy, cbReq, enmType);
     2116    rc = VbglR0GRAlloc(&pReqCopy, cbReq, enmType);
    21172117    if (RT_FAILURE(rc))
    21182118    {
     
    21282128        pSession->u32MousePosChangedSeq = ASMAtomicUoReadU32(&pDevExt->u32MousePosChangedSeq);
    21292129
    2130     rc = VbglGRPerform(pReqCopy);
     2130    rc = VbglR0GRPerform(pReqCopy);
    21312131    if (   RT_SUCCESS(rc)
    21322132        && RT_SUCCESS(pReqCopy->rc))
     
    21392139    }
    21402140    else if (RT_FAILURE(rc))
    2141         Log(("VBOXGUEST_IOCTL_VMMREQUEST: VbglGRPerform - rc=%Rrc!\n", rc));
     2141        Log(("VBOXGUEST_IOCTL_VMMREQUEST: VbglR0GRPerform - rc=%Rrc!\n", rc));
    21422142    else
    21432143    {
     
    21462146    }
    21472147
    2148     VbglGRFree(pReqCopy);
     2148    VbglR0GRFree(pReqCopy);
    21492149    return rc;
    21502150}
     
    24722472    if (pDevExt->MemBalloon.pOwner == pSession)
    24732473    {
    2474         rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevGetMemBalloonChangeRequest), VMMDevReq_GetMemBalloonChangeRequest);
     2474        rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(VMMDevGetMemBalloonChangeRequest), VMMDevReq_GetMemBalloonChangeRequest);
    24752475        if (RT_SUCCESS(rc))
    24762476        {
     
    24812481             */
    24822482            pReq->eventAck = VMMDEV_EVENT_BALLOON_CHANGE_REQUEST;
    2483             rc = VbglGRPerform(&pReq->header);
     2483            rc = VbglR0GRPerform(&pReq->header);
    24842484            if (RT_SUCCESS(rc))
    24852485            {
     
    25012501            }
    25022502            else
    2503                 LogRel(("VBGL_IOCTL_CHECK_BALLOON: VbglGRPerform failed. rc=%Rrc\n", rc));
    2504             VbglGRFree(&pReq->header);
     2503                LogRel(("VBGL_IOCTL_CHECK_BALLOON: VbglR0GRPerform failed. rc=%Rrc\n", rc));
     2504            VbglR0GRFree(&pReq->header);
    25052505        }
    25062506    }
     
    25862586    RT_NOREF1(pDevExt);
    25872587
    2588     rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_WriteCoreDump);
     2588    rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_WriteCoreDump);
    25892589    if (RT_SUCCESS(rc))
    25902590    {
    25912591        pReq->fFlags = pInfo->u.In.fFlags;
    2592         rc = VbglGRPerform(&pReq->header);
     2592        rc = VbglR0GRPerform(&pReq->header);
    25932593        if (RT_FAILURE(rc))
    2594             Log(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP: VbglGRPerform failed, rc=%Rrc!\n", rc));
    2595 
    2596         VbglGRFree(&pReq->header);
     2594            Log(("VBOXGUEST_IOCTL_WRITE_CORE_DUMP: VbglR0GRPerform failed, rc=%Rrc!\n", rc));
     2595
     2596        VbglR0GRFree(&pReq->header);
    25972597    }
    25982598    else
     
    27412741{
    27422742    VMMDevCtlGuestFilterMask *pReq;
    2743     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_CtlGuestFilterMask);
     2743    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_CtlGuestFilterMask);
    27442744    if (RT_SUCCESS(rc))
    27452745    {
    27462746        pReq->u32NotMask = UINT32_MAX & ~fFixedEvents;
    27472747        pReq->u32OrMask  = fFixedEvents;
    2748         rc = VbglGRPerform(&pReq->header);
     2748        rc = VbglR0GRPerform(&pReq->header);
    27492749        if (RT_FAILURE(rc))
    27502750            LogRelFunc(("failed with rc=%Rrc\n", rc));
    2751         VbglGRFree(&pReq->header);
     2751        VbglR0GRFree(&pReq->header);
    27522752    }
    27532753    RT_NOREF1(pDevExt);
     
    27852785     * Preallocate a request buffer so we can do all in one go without leaving the spinlock.
    27862786     */
    2787     rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_CtlGuestFilterMask);
     2787    rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_CtlGuestFilterMask);
    27882788    if (RT_SUCCESS(rc))
    27892789    { /* nothing */ }
    27902790    else if (!fSessionTermination)
    27912791    {
    2792         LogRel(("vgdrvSetSessionFilterMask: VbglGRAlloc failure: %Rrc\n", rc));
     2792        LogRel(("vgdrvSetSessionFilterMask: VbglR0GRAlloc failure: %Rrc\n", rc));
    27932793        return rc;
    27942794    }
     
    28322832                    pDevExt->fEventFilterHost = pReq->u32OrMask;
    28332833                    pReq->u32NotMask = ~pReq->u32OrMask;
    2834                     rc = VbglGRPerform(&pReq->header);
     2834                    rc = VbglR0GRPerform(&pReq->header);
    28352835                    if (RT_FAILURE(rc))
    28362836                    {
     
    28552855    RTSpinlockRelease(pDevExt->SessionSpinlock);
    28562856    if (pReq)
    2857         VbglGRFree(&pReq->header);
     2857        VbglR0GRFree(&pReq->header);
    28582858    return rc;
    28592859}
     
    28922892{
    28932893    VMMDevReqMouseStatus *pReq;
    2894     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetMouseStatus);
     2894    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetMouseStatus);
    28952895    if (RT_SUCCESS(rc))
    28962896    {
     
    28982898        pReq->pointerXPos   = 0;
    28992899        pReq->pointerYPos   = 0;
    2900         rc = VbglGRPerform(&pReq->header);
     2900        rc = VbglR0GRPerform(&pReq->header);
    29012901        if (RT_FAILURE(rc))
    29022902            LogRelFunc(("failed with rc=%Rrc\n", rc));
    2903         VbglGRFree(&pReq->header);
     2903        VbglR0GRFree(&pReq->header);
    29042904    }
    29052905    RT_NOREF1(pDevExt);
     
    29372937     * Preallocate a request buffer so we can do all in one go without leaving the spinlock.
    29382938     */
    2939     rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetMouseStatus);
     2939    rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetMouseStatus);
    29402940    if (RT_SUCCESS(rc))
    29412941    { /* nothing */ }
    29422942    else if (!fSessionTermination)
    29432943    {
    2944         LogRel(("vgdrvSetSessionMouseStatus: VbglGRAlloc failure: %Rrc\n", rc));
     2944        LogRel(("vgdrvSetSessionMouseStatus: VbglR0GRAlloc failure: %Rrc\n", rc));
    29452945        return rc;
    29462946    }
     
    29832983                    pReq->pointerXPos = 0;
    29842984                    pReq->pointerYPos = 0;
    2985                     rc = VbglGRPerform(&pReq->header);
     2985                    rc = VbglR0GRPerform(&pReq->header);
    29862986                    if (RT_FAILURE(rc))
    29872987                    {
     
    30063006    RTSpinlockRelease(pDevExt->SessionSpinlock);
    30073007    if (pReq)
    3008         VbglGRFree(&pReq->header);
     3008        VbglR0GRFree(&pReq->header);
    30093009    return rc;
    30103010}
     
    30903090{
    30913091    VMMDevReqGuestCapabilities2 *pReq;
    3092     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetGuestCapabilities);
     3092    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetGuestCapabilities);
    30933093    if (RT_SUCCESS(rc))
    30943094    {
    30953095        pReq->u32NotMask = UINT32_MAX;
    30963096        pReq->u32OrMask  = 0;
    3097         rc = VbglGRPerform(&pReq->header);
     3097        rc = VbglR0GRPerform(&pReq->header);
    30983098
    30993099        if (RT_FAILURE(rc))
    31003100            LogRelFunc(("failed with rc=%Rrc\n", rc));
    3101         VbglGRFree(&pReq->header);
     3101        VbglR0GRFree(&pReq->header);
    31023102    }
    31033103    RT_NOREF1(pDevExt);
     
    31273127        pDevExt->fGuestCapsHost = pReq->u32OrMask;
    31283128        pReq->u32NotMask = ~pReq->u32OrMask;
    3129         rc = VbglGRPerform(&pReq->header);
     3129        rc = VbglR0GRPerform(&pReq->header);
    31303130        if (RT_FAILURE(rc))
    31313131            pDevExt->fGuestCapsHost = UINT32_MAX;
     
    32033203    if (!(fFlags & VBGL_IOC_AGC_FLAGS_CONFIG_ACQUIRE_MODE))
    32043204    {
    3205         rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetGuestCapabilities);
     3205        rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetGuestCapabilities);
    32063206        if (RT_SUCCESS(rc))
    32073207        { /* do nothing */ }
    32083208        else if (!fSessionTermination)
    32093209        {
    3210             LogRel(("vgdrvAcquireSessionCapabilities: pSession=%p fOrMask=%#x fNotMask=%#x fFlags=%#x: VbglGRAlloc failure: %Rrc\n",
     3210            LogRel(("vgdrvAcquireSessionCapabilities: pSession=%p fOrMask=%#x fNotMask=%#x fFlags=%#x: VbglR0GRAlloc failure: %Rrc\n",
    32113211                    pSession, fOrMask, fNotMask, fFlags, rc));
    32123212            return rc;
     
    32313231
    32323232        if (pReq)
    3233             VbglGRFree(&pReq->header);
     3233            VbglR0GRFree(&pReq->header);
    32343234        AssertMsgFailed(("Trying to change caps mode: %#x\n", fOrMask));
    32353235        LogRel(("vgdrvAcquireSessionCapabilities: pSession=%p fOrMask=%#x fNotMask=%#x fFlags=%#x: calling caps acquire for set caps\n",
     
    33033303                    RTSpinlockRelease(pDevExt->EventSpinlock);
    33043304                    LogRel(("vgdrvAcquireSessionCapabilities: vgdrvUpdateCapabilitiesOnHostWithReqAndLock failed: rc=%Rrc\n", rc));
    3305                     VbglGRFree(&pReq->header);
     3305                    VbglR0GRFree(&pReq->header);
    33063306                    return rc;
    33073307                }
     
    33143314
    33153315        Log(("vgdrvAcquireSessionCapabilities: Caps %#x were busy\n", fOtherConflictingCaps));
    3316         VbglGRFree(&pReq->header);
     3316        VbglR0GRFree(&pReq->header);
    33173317        return VERR_RESOURCE_BUSY;
    33183318    }
     
    33203320    RTSpinlockRelease(pDevExt->EventSpinlock);
    33213321    if (pReq)
    3322         VbglGRFree(&pReq->header);
     3322        VbglR0GRFree(&pReq->header);
    33233323
    33243324    /*
     
    34033403     */
    34043404    VMMDevReqGuestCapabilities2 *pReq;
    3405     int rc = VbglGRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetGuestCapabilities);
     3405    int rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pReq, sizeof(*pReq), VMMDevReq_SetGuestCapabilities);
    34063406    if (RT_SUCCESS(rc))
    34073407    { /* nothing */ }
     
    34123412        if (pfGlobalCaps)
    34133413            *pfGlobalCaps  = UINT32_MAX;
    3414         LogRel(("vgdrvSetSessionCapabilities: VbglGRAlloc failure: %Rrc\n", rc));
     3414        LogRel(("vgdrvSetSessionCapabilities: VbglR0GRAlloc failure: %Rrc\n", rc));
    34153415        return rc;
    34163416    }
     
    34793479    RTSpinlockRelease(pDevExt->SessionSpinlock);
    34803480    if (pReq)
    3481         VbglGRFree(&pReq->header);
     3481        VbglR0GRFree(&pReq->header);
    34823482    return rc;
    34833483}
     
    39113911        /*
    39123912         * Acknowlegde events.
    3913          * We don't use VbglGRPerform here as it may take another spinlocks.
     3913         * We don't use VbglR0GRPerform here as it may take another spinlocks.
    39143914         */
    39153915        pReq->header.rc = VERR_INTERNAL_ERROR;
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibCrOgl.cpp

    r68653 r68654  
    3737
    3838
    39 DECLVBGL(int) VbglR0CrCtlCreate(VBGLCRCTLHANDLE *phCtl)
     39DECLR0VBGL(int) VbglR0CrCtlCreate(VBGLCRCTLHANDLE *phCtl)
    4040{
    4141    int rc;
     
    6969}
    7070
    71 DECLVBGL(int) VbglR0CrCtlDestroy(VBGLCRCTLHANDLE hCtl)
     71DECLR0VBGL(int) VbglR0CrCtlDestroy(VBGLCRCTLHANDLE hCtl)
    7272{
    7373    VbglR0IdcClose(&hCtl->IdcHandle);
     
    7878}
    7979
    80 DECLVBGL(int) VbglR0CrCtlConConnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID *pidClient)
     80DECLR0VBGL(int) VbglR0CrCtlConConnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID *pidClient)
    8181{
    8282    VBGLIOCHGCMCONNECT info;
     
    103103}
    104104
    105 DECLVBGL(int) VbglR0CrCtlConDisconnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID idClient)
     105DECLR0VBGL(int) VbglR0CrCtlConDisconnect(VBGLCRCTLHANDLE hCtl, HGCMCLIENTID idClient)
    106106{
    107107    VBGLIOCHGCMDISCONNECT info;
     
    111111}
    112112
    113 DECLVBGL(int) VbglR0CrCtlConCallRaw(VBGLCRCTLHANDLE hCtl, PVBGLIOCHGCMCALL pCallInfo, int cbCallInfo)
     113DECLR0VBGL(int) VbglR0CrCtlConCallRaw(VBGLCRCTLHANDLE hCtl, PVBGLIOCHGCMCALL pCallInfo, int cbCallInfo)
    114114{
    115115    return VbglR0IdcCallRaw(&hCtl->IdcHandle, VBGL_IOCTL_HGCM_CALL(cbCallInfo), &pCallInfo->Hdr, cbCallInfo);
    116116}
    117117
    118 DECLVBGL(int) VbglR0CrCtlConCall(VBGLCRCTLHANDLE hCtl, PVBGLIOCHGCMCALL pCallInfo, int cbCallInfo)
     118DECLR0VBGL(int) VbglR0CrCtlConCall(VBGLCRCTLHANDLE hCtl, PVBGLIOCHGCMCALL pCallInfo, int cbCallInfo)
    119119{
    120120    int rc = VbglR0IdcCallRaw(&hCtl->IdcHandle, VBGL_IOCTL_HGCM_CALL(cbCallInfo), &pCallInfo->Hdr, cbCallInfo);
     
    124124}
    125125
    126 DECLVBGL(int) VbglR0CrCtlConCallUserDataRaw(VBGLCRCTLHANDLE hCtl, PVBGLIOCHGCMCALL pCallInfo, int cbCallInfo)
     126DECLR0VBGL(int) VbglR0CrCtlConCallUserDataRaw(VBGLCRCTLHANDLE hCtl, PVBGLIOCHGCMCALL pCallInfo, int cbCallInfo)
    127127{
    128128    return VbglR0IdcCallRaw(&hCtl->IdcHandle, VBGL_IOCTL_HGCM_CALL_WITH_USER_DATA(cbCallInfo), &pCallInfo->Hdr, cbCallInfo);
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibGenericRequest.cpp

    r68653 r68654  
    3636
    3737
    38 DECLVBGL(int) VbglGRVerify(const VMMDevRequestHeader *pReq, size_t cbReq)
     38DECLR0VBGL(int) VbglGR0Verify(const VMMDevRequestHeader *pReq, size_t cbReq)
    3939{
    4040    size_t cbReqExpected;
     
    4242    if (RT_UNLIKELY(!pReq || cbReq < sizeof(VMMDevRequestHeader)))
    4343    {
    44         dprintf(("VbglGRVerify: Invalid parameter: pReq = %p, cbReq = %zu\n", pReq, cbReq));
     44        dprintf(("VbglGR0Verify: Invalid parameter: pReq = %p, cbReq = %zu\n", pReq, cbReq));
    4545        return VERR_INVALID_PARAMETER;
    4646    }
     
    4848    if (RT_UNLIKELY(pReq->size > cbReq))
    4949    {
    50         dprintf(("VbglGRVerify: request size %u > buffer size %zu\n", pReq->size, cbReq));
     50        dprintf(("VbglGR0Verify: request size %u > buffer size %zu\n", pReq->size, cbReq));
    5151        return VERR_INVALID_PARAMETER;
    5252    }
     
    5656    if (RT_UNLIKELY(cbReq < cbReqExpected))
    5757    {
    58         dprintf(("VbglGRVerify: buffer size %zu < expected size %zu\n", cbReq, cbReqExpected));
     58        dprintf(("VbglGR0Verify: buffer size %zu < expected size %zu\n", cbReq, cbReqExpected));
    5959        return VERR_INVALID_PARAMETER;
    6060    }
     
    6868        if (RT_UNLIKELY(pReq->size != cbReqExpected))
    6969        {
    70             dprintf(("VbglGRVerify: request size %u != expected size %zu\n", pReq->size, cbReqExpected));
     70            dprintf(("VbglGR0Verify: request size %u != expected size %zu\n", pReq->size, cbReqExpected));
    7171            return VERR_INVALID_PARAMETER;
    7272        }
     
    9696        if (RT_UNLIKELY(cbReq > VMMDEV_MAX_VMMDEVREQ_SIZE))
    9797        {
    98             dprintf(("VbglGRVerify: VMMDevReq_LogString: buffer size %zu too big\n", cbReq));
     98            dprintf(("VbglGR0Verify: VMMDevReq_LogString: buffer size %zu too big\n", cbReq));
    9999            return VERR_BUFFER_OVERFLOW; /** @todo is this error code ok? */
    100100        }
     
    102102    else
    103103    {
    104         dprintf(("VbglGRVerify: request size %u > buffer size %zu\n", pReq->size, cbReq));
     104        dprintf(("VbglGR0Verify: request size %u > buffer size %zu\n", pReq->size, cbReq));
    105105        return VERR_IO_BAD_LENGTH; /** @todo is this error code ok? */
    106106    }
     
    109109}
    110110
    111 DECLVBGL(int) VbglGRAlloc(VMMDevRequestHeader **ppReq, size_t cbReq, VMMDevRequestType enmReqType)
     111DECLR0VBGL(int) VbglR0GRAlloc(VMMDevRequestHeader **ppReq, size_t cbReq, VMMDevRequestType enmReqType)
    112112{
    113113    int rc = vbglR0Enter();
     
    118118            && cbReq == (uint32_t)cbReq)
    119119        {
    120             VMMDevRequestHeader *pReq = (VMMDevRequestHeader *)VbglPhysHeapAlloc((uint32_t)cbReq);
    121             AssertMsgReturn(pReq, ("VbglGRAlloc: no memory (cbReq=%u)\n", cbReq), VERR_NO_MEMORY);
     120            VMMDevRequestHeader *pReq = (VMMDevRequestHeader *)VbglR0PhysHeapAlloc((uint32_t)cbReq);
     121            AssertMsgReturn(pReq, ("VbglR0GRAlloc: no memory (cbReq=%u)\n", cbReq), VERR_NO_MEMORY);
    122122            memset(pReq, 0xAA, cbReq);
    123123
     
    134134        else
    135135        {
    136             dprintf(("VbglGRAlloc: Invalid parameter: ppReq=%p cbReq=%u\n", ppReq, cbReq));
     136            dprintf(("VbglR0GRAlloc: Invalid parameter: ppReq=%p cbReq=%u\n", ppReq, cbReq));
    137137            rc = VERR_INVALID_PARAMETER;
    138138        }
     
    141141}
    142142
    143 DECLVBGL(int) VbglGRPerform(VMMDevRequestHeader *pReq)
     143DECLR0VBGL(int) VbglR0GRPerform(VMMDevRequestHeader *pReq)
    144144{
    145145    int rc = vbglR0Enter();
     
    148148        if (pReq)
    149149        {
    150             RTCCPHYS PhysAddr = VbglPhysHeapGetPhysAddr(pReq);
     150            RTCCPHYS PhysAddr = VbglR0PhysHeapGetPhysAddr(pReq);
    151151            if (   PhysAddr != 0
    152152                && PhysAddr < _4G) /* Port IO is 32 bit. */
     
    166166}
    167167
    168 DECLVBGL(void) VbglGRFree(VMMDevRequestHeader *pReq)
     168DECLR0VBGL(void) VbglR0GRFree(VMMDevRequestHeader *pReq)
    169169{
    170170    int rc = vbglR0Enter();
    171171    if (RT_SUCCESS(rc))
    172         VbglPhysHeapFree(pReq);
     172        VbglR0PhysHeapFree(pReq);
    173173}
    174174
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibHGCM.cpp

    r68653 r68654  
    6464 * @return VBox status code.
    6565 */
    66 DECLVBGL(int) VbglR0HGCMInit(void)
     66DECLR0VBGL(int) VbglR0HGCMInit(void)
    6767{
    6868    AssertReturn(g_hMtxHGCMHandleData == NIL_RTSEMFASTMUTEX, VINF_ALREADY_INITIALIZED);
     
    7575 * @return VBox status code.
    7676 */
    77 DECLVBGL(int) VbglR0HGCMTerminate(void)
     77DECLR0VBGL(int) VbglR0HGCMTerminate(void)
    7878{
    7979    RTSemFastMutexDestroy(g_hMtxHGCMHandleData);
     
    139139}
    140140
    141 DECLVBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient)
     141DECLR0VBGL(int) VbglR0HGCMConnect(VBGLHGCMHANDLE *pHandle, const char *pszServiceName, HGCMCLIENTID *pidClient)
    142142{
    143143    int rc;
     
    182182}
    183183
    184 DECLVBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient)
     184DECLR0VBGL(int) VbglR0HGCMDisconnect(VBGLHGCMHANDLE handle, HGCMCLIENTID idClient)
    185185{
    186186    int rc;
     
    199199}
    200200
    201 DECLVBGL(int) VbglR0HGCMCallRaw(VBGLHGCMHANDLE handle, PVBGLIOCHGCMCALL pData, uint32_t cbData)
     201DECLR0VBGL(int) VbglR0HGCMCallRaw(VBGLHGCMHANDLE handle, PVBGLIOCHGCMCALL pData, uint32_t cbData)
    202202{
    203203    VBGL_HGCM_ASSERT_MSG(cbData >= sizeof(VBGLIOCHGCMCALL) + pData->cParms * sizeof(HGCMFunctionParameter),
     
    208208}
    209209
    210 DECLVBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, PVBGLIOCHGCMCALL pData, uint32_t cbData)
     210DECLR0VBGL(int) VbglR0HGCMCall(VBGLHGCMHANDLE handle, PVBGLIOCHGCMCALL pData, uint32_t cbData)
    211211{
    212212    int rc = VbglR0HGCMCallRaw(handle, pData, cbData);
     
    216216}
    217217
    218 DECLVBGL(int) VbglR0HGCMCallUserDataRaw(VBGLHGCMHANDLE handle, PVBGLIOCHGCMCALL pData, uint32_t cbData)
     218DECLR0VBGL(int) VbglR0HGCMCallUserDataRaw(VBGLHGCMHANDLE handle, PVBGLIOCHGCMCALL pData, uint32_t cbData)
    219219{
    220220    VBGL_HGCM_ASSERT_MSG(cbData >= sizeof(VBGLIOCHGCMCALL) + pData->cParms * sizeof(HGCMFunctionParameter),
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibHGCMInternal.cpp

    r68653 r68654  
    9494        /* Allocate request */
    9595        VMMDevHGCMConnect *pHGCMConnect = NULL;
    96         rc = VbglGRAlloc((VMMDevRequestHeader **)&pHGCMConnect, sizeof(VMMDevHGCMConnect), VMMDevReq_HGCMConnect);
     96        rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pHGCMConnect, sizeof(VMMDevHGCMConnect), VMMDevReq_HGCMConnect);
    9797        if (RT_SUCCESS(rc))
    9898        {
     
    104104
    105105            /* Issue request */
    106             rc = VbglGRPerform (&pHGCMConnect->header.header);
     106            rc = VbglR0GRPerform (&pHGCMConnect->header.header);
    107107            if (RT_SUCCESS(rc))
    108108            {
     
    118118                    *pidClient = pHGCMConnect->u32ClientID;
    119119            }
    120             VbglGRFree(&pHGCMConnect->header.header);
     120            VbglR0GRFree(&pHGCMConnect->header.header);
    121121        }
    122122    }
     
    136136        /* Allocate request */
    137137        VMMDevHGCMDisconnect *pHGCMDisconnect = NULL;
    138         rc = VbglGRAlloc ((VMMDevRequestHeader **)&pHGCMDisconnect, sizeof (VMMDevHGCMDisconnect), VMMDevReq_HGCMDisconnect);
     138        rc = VbglR0GRAlloc ((VMMDevRequestHeader **)&pHGCMDisconnect, sizeof (VMMDevHGCMDisconnect), VMMDevReq_HGCMDisconnect);
    139139        if (RT_SUCCESS(rc))
    140140        {
     
    145145
    146146            /* Issue request */
    147             rc = VbglGRPerform(&pHGCMDisconnect->header.header);
     147            rc = VbglR0GRPerform(&pHGCMDisconnect->header.header);
    148148            if (RT_SUCCESS(rc))
    149149            {
     
    158158            }
    159159
    160             VbglGRFree(&pHGCMDisconnect->header.header);
     160            VbglR0GRFree(&pHGCMDisconnect->header.header);
    161161        }
    162162    }
     
    631631    int rc;
    632632
    633     Log(("calling VbglGRPerform\n"));
    634     rc = VbglGRPerform(&pHGCMCall->header.header);
    635     Log(("VbglGRPerform rc = %Rrc (header rc=%d)\n", rc, pHGCMCall->header.result));
     633    Log(("calling VbglR0GRPerform\n"));
     634    rc = VbglR0GRPerform(&pHGCMCall->header.header);
     635    Log(("VbglR0GRPerform rc = %Rrc (header rc=%d)\n", rc, pHGCMCall->header.result));
    636636
    637637    /*
     
    672672             *  version of all that stuff, I would've done it already. */
    673673            VMMDevHGCMCancel2 *pCancelReq;
    674             int rc2 = VbglGRAlloc((VMMDevRequestHeader **)&pCancelReq, sizeof(*pCancelReq), VMMDevReq_HGCMCancel2);
     674            int rc2 = VbglR0GRAlloc((VMMDevRequestHeader **)&pCancelReq, sizeof(*pCancelReq), VMMDevReq_HGCMCancel2);
    675675            if (RT_SUCCESS(rc2))
    676676            {
    677                 pCancelReq->physReqToCancel = VbglPhysHeapGetPhysAddr(pHGCMCall);
    678                 rc2 = VbglGRPerform(&pCancelReq->header);
    679                 VbglGRFree(&pCancelReq->header);
     677                pCancelReq->physReqToCancel = VbglR0PhysHeapGetPhysAddr(pHGCMCall);
     678                rc2 = VbglR0GRPerform(&pCancelReq->header);
     679                VbglR0GRFree(&pCancelReq->header);
    680680            }
    681681#if 1 /** @todo ADDVER: Remove this on next minor version change. */
     
    685685                pHGCMCall->header.fu32Flags |= VBOX_HGCM_REQ_CANCELLED;
    686686                pHGCMCall->header.header.requestType = VMMDevReq_HGCMCancel;
    687                 rc2 = VbglGRPerform(&pHGCMCall->header.header);
     687                rc2 = VbglR0GRPerform(&pHGCMCall->header.header);
    688688                if (rc2 == VERR_INVALID_PARAMETER)
    689689                    rc2 = VERR_NOT_FOUND;
     
    890890         */
    891891        VMMDevHGCMCall *pHGCMCall;
    892         rc = VbglGRAlloc((VMMDevRequestHeader **)&pHGCMCall,
     892        rc = VbglR0GRAlloc((VMMDevRequestHeader **)&pHGCMCall,
    893893                         sizeof(VMMDevHGCMCall) + pCallInfo->cParms * sizeof(HGCMFunctionParameter) + cbExtra,
    894894                         VMMDevReq_HGCMCall);
     
    921921
    922922            if (!fLeakIt)
    923                 VbglGRFree(&pHGCMCall->header.header);
     923                VbglR0GRFree(&pHGCMCall->header.header);
    924924        }
    925925    }
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibInit.cpp

    r68645 r68654  
    4444
    4545/**
    46  * Used by vbglQueryDriverInfo and VbglInit to try get the host feature mask and
    47  * version information (g_vbgldata::hostVersion).
     46 * Used by vbglR0QueryDriverInfo and VbglInit to try get the host feature mask
     47 * and version information (g_vbgldata::hostVersion).
    4848 *
    4949 * This was first implemented by the host in 3.1 and we quietly ignore failures
     
    5353{
    5454    VMMDevReqHostVersion *pReq;
    55     int rc = VbglGRAlloc((VMMDevRequestHeader **) &pReq, sizeof (*pReq), VMMDevReq_GetHostVersion);
    56     if (RT_SUCCESS(rc))
    57     {
    58         rc = VbglGRPerform(&pReq->header);
     55    int rc = VbglR0GRAlloc((VMMDevRequestHeader **) &pReq, sizeof (*pReq), VMMDevReq_GetHostVersion);
     56    if (RT_SUCCESS(rc))
     57    {
     58        rc = VbglR0GRPerform(&pReq->header);
    5959        if (RT_SUCCESS(rc))
    6060        {
     
    6464        }
    6565
    66         VbglGRFree(&pReq->header);
     66        VbglR0GRFree(&pReq->header);
    6767    }
    6868}
     
    7878 * values and fails if they are unavailable.
    7979 */
    80 static void vbglQueryDriverInfo(void)
     80static void vbglR0QueryDriverInfo(void)
    8181{
    8282# ifdef VBGLDATA_USE_FAST_MUTEX
     
    143143    if (g_vbgldata.status == VbglStatusInitializing)
    144144    {
    145         vbglQueryDriverInfo();
     145        vbglR0QueryDriverInfo();
    146146        if (g_vbgldata.status == VbglStatusReady)
    147147            return VINF_SUCCESS;
     
    152152
    153153
    154 static int vbglInitCommon(void)
     154static int vbglR0InitCommon(void)
    155155{
    156156    int rc;
     
    159159    g_vbgldata.status = VbglStatusInitializing;
    160160
    161     rc = VbglPhysHeapInit();
    162     if (RT_SUCCESS(rc))
    163     {
    164         dprintf(("vbglInitCommon: returns rc = %d\n", rc));
     161    rc = VbglR0PhysHeapInit();
     162    if (RT_SUCCESS(rc))
     163    {
     164        dprintf(("vbglR0InitCommon: returns rc = %d\n", rc));
    165165        return rc;
    166166    }
    167167
    168     LogRel(("vbglInitCommon: VbglPhysHeapInit failed: rc=%Rrc\n", rc));
     168    LogRel(("vbglR0InitCommon: VbglR0PhysHeapInit failed: rc=%Rrc\n", rc));
    169169    g_vbgldata.status = VbglStatusNotInitialized;
    170170    return rc;
     
    172172
    173173
    174 static void vbglTerminateCommon(void)
    175 {
    176     VbglPhysHeapTerminate();
     174static void vbglR0TerminateCommon(void)
     175{
     176    VbglR0PhysHeapTerminate();
    177177    g_vbgldata.status = VbglStatusNotInitialized;
    178178}
     
    180180#ifdef VBGL_VBOXGUEST
    181181
    182 DECLVBGL(int) VbglInitPrimary(RTIOPORT portVMMDev, VMMDevMemory *pVMMDevMemory)
     182DECLVBGL(int) VbglR0InitPrimary(RTIOPORT portVMMDev, VMMDevMemory *pVMMDevMemory)
    183183{
    184184    int rc;
     
    197197# endif
    198198
    199     rc = vbglInitCommon();
     199    rc = vbglR0InitCommon();
    200200    if (RT_SUCCESS(rc))
    201201    {
     
    214214DECLVBGL(void) VbglR0TerminatePrimary(void)
    215215{
    216     vbglTerminateCommon();
     216    vbglR0TerminateCommon();
    217217}
    218218
     
    232232    }
    233233
    234     rc = vbglInitCommon();
     234    rc = vbglR0InitCommon();
    235235    if (RT_SUCCESS(rc))
    236236    {
     
    243243        {
    244244            /* Try to obtain VMMDev port via IOCTL to VBoxGuest main driver. */
    245             vbglQueryDriverInfo();
     245            vbglR0QueryDriverInfo();
    246246
    247247# ifdef VBOX_WITH_HGCM
     
    259259# endif
    260260        }
    261         vbglTerminateCommon();
     261        vbglR0TerminateCommon();
    262262    }
    263263
     
    282282# endif
    283283
    284     /* note: do vbglTerminateCommon as a last step since it zeroez up the g_vbgldata
    285      * conceptually, doing vbglTerminateCommon last is correct
     284    /* note: do vbglR0TerminateCommon as a last step since it zeroez up the g_vbgldata
     285     * conceptually, doing vbglR0TerminateCommon last is correct
    286286     * since this is the reverse order to how init is done */
    287     vbglTerminateCommon();
     287    vbglR0TerminateCommon();
    288288}
    289289
     
    295295    else
    296296    {
    297         vbglQueryDriverInfo();
     297        vbglR0QueryDriverInfo();
    298298        if (g_vbgldata.status != VbglStatusReady)
    299299        {
     
    308308
    309309#endif /* !VBGL_VBOXGUEST */
     310
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibMouse.cpp

    r68653 r68654  
    4848 * @param   pvUser     user supplied data/cookie to be passed to the function.
    4949 */
    50 DECLVBGL(int) VbglSetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser)
     50DECLR0VBGL(int) VbglR0SetMouseNotifyCallback(PFNVBOXGUESTMOUSENOTIFY pfnNotify, void *pvUser)
    5151{
    5252    PVBGLIDCHANDLE pIdcHandle;
     
    6363}
    6464
     65
    6566/**
    6667 * Retrieve mouse coordinates and features from the host.
     
    7374 * @param   py          Where to store the Y co-ordinate.
    7475 */
    75 DECLVBGL(int) VbglGetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py)
     76DECLR0VBGL(int) VbglR0GetMouseStatus(uint32_t *pfFeatures, uint32_t *px, uint32_t *py)
    7677{
    7778    PVBGLIDCHANDLE pIdcHandle;
     
    9899}
    99100
     101
    100102/**
    101103 * Send mouse features to the host.
     
    108110 *                     feature enabled by any guest caller.
    109111 */
    110 DECLVBGL(int) VbglSetMouseStatus(uint32_t fFeatures)
     112DECLR0VBGL(int) VbglR0SetMouseStatus(uint32_t fFeatures)
    111113{
    112114    PVBGLIDCHANDLE pIdcHandle;
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibPhysHeap.cpp

    r68653 r68654  
    397397
    398398
    399 DECLVBGL(void *) VbglPhysHeapAlloc (uint32_t cbSize)
     399DECLR0VBGL(void *) VbglR0PhysHeapAlloc (uint32_t cbSize)
    400400{
    401401    VBGLPHYSHEAPBLOCK *pBlock, *iter;
     
    494494
    495495    vbglPhysHeapLeave ();
    496     VBGL_PH_dprintf(("VbglPhysHeapAlloc %x size %x\n", vbglPhysHeapBlock2Data (pBlock), pBlock->cbDataSize));
     496    VBGL_PH_dprintf(("VbglR0PhysHeapAlloc %x size %x\n", vbglPhysHeapBlock2Data (pBlock), pBlock->cbDataSize));
    497497
    498498    return vbglPhysHeapBlock2Data (pBlock);
    499499}
    500500
    501 DECLVBGL(uint32_t) VbglPhysHeapGetPhysAddr (void *p)
     501DECLR0VBGL(uint32_t) VbglR0PhysHeapGetPhysAddr (void *p)
    502502{
    503503    uint32_t physAddr = 0;
     
    516516}
    517517
    518 DECLVBGL(void) VbglPhysHeapFree(void *p)
     518DECLR0VBGL(void) VbglR0PhysHeapFree(void *p)
    519519{
    520520    VBGLPHYSHEAPBLOCK *pBlock;
     
    543543    dumpheap ("post exclude");
    544544
    545     VBGL_PH_dprintf(("VbglPhysHeapFree %x size %x\n", p, pBlock->cbDataSize));
     545    VBGL_PH_dprintf(("VbglR0PhysHeapFree %x size %x\n", p, pBlock->cbDataSize));
    546546
    547547    /* Mark as free */
     
    613613}
    614614
    615 DECLVBGL(int) VbglPhysHeapInit (void)
     615DECLR0VBGL(int) VbglR0PhysHeapInit (void)
    616616{
    617617    int rc = VINF_SUCCESS;
     
    628628}
    629629
    630 DECLVBGL(void) VbglPhysHeapTerminate (void)
     630DECLR0VBGL(void) VbglR0PhysHeapTerminate (void)
    631631{
    632632    while (g_vbgldata.pChunkHead)
  • trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR0LibVMMDev.cpp

    r68653 r68654  
    3131
    3232
    33 DECLVBGL(int) VbglQueryVMMDevMemory(VMMDevMemory **ppVMMDevMemory)
     33DECLVBGL(int) VbglR0QueryVMMDevMemory(VMMDevMemory **ppVMMDevMemory)
    3434{
    3535    int rc = vbglR0Enter();
  • trunk/src/VBox/Additions/solaris/Mouse/testcase/solaris.h

    r68550 r68654  
    347347#define VBoxGuestCommonIOCtl(...) VINF_SUCCESS
    348348#define VBoxGuestCommonISR(...) true
    349 #define VbglGRAlloc(...) VINF_SUCCESS
    350 #define VbglGRPerform(...) VINF_SUCCESS
    351 #define VbglGRFree(...) do {} while(0)
     349#define VbglR0GRAlloc(...) VINF_SUCCESS
     350#define VbglR0GRPerform(...) VINF_SUCCESS
     351#define VbglR0GRFree(...) do {} while(0)
    352352#endif
    353353#define VbglR0InitClient(...) VINF_SUCCESS
  • trunk/src/VBox/Additions/solaris/Mouse/vboxms.c

    r68640 r68654  
    472472        if (RT_SUCCESS(rc))
    473473        {
    474             rc = VbglGRAlloc((VMMDevRequestHeader **)
     474            rc = VbglR0GRAlloc((VMMDevRequestHeader **)
    475475                             &pState->pMouseStatusReq,
    476476                             sizeof(*pState->pMouseStatusReq),
     
    488488                qprocson(pReadQueue);
    489489                /* Enable our IRQ handler. */
    490                 rc2 = VbglSetMouseNotifyCallback(vbmsSolNotify,
    491                                                  (void *)pState);
     490                rc2 = VbglR0SetMouseNotifyCallback(vbmsSolNotify, (void *)pState);
    492491                if (RT_FAILURE(rc2))
    493492                    /* Log the failure.  I may well have not understood what
     
    525524    pState->pMouseStatusReq->pointerXPos = 0;
    526525    pState->pMouseStatusReq->pointerYPos = 0;
    527     rc = VbglGRPerform(&pState->pMouseStatusReq->header);
     526    rc = VbglR0GRPerform(&pState->pMouseStatusReq->header);
    528527    if (RT_SUCCESS(rc))
    529528    {
     
    590589    if (!pState->cInits)
    591590    {
    592         VbglSetMouseStatus(0);
     591        VbglR0SetMouseStatus(0);
    593592        /* Disable our IRQ handler. */
    594         VbglSetMouseNotifyCallback(NULL, NULL);
     593        VbglR0SetMouseNotifyCallback(NULL, NULL);
    595594        qprocsoff(pReadQueue);
    596595
     
    600599        ASMAtomicWriteNullPtr(&pState->pWriteQueue);
    601600        pReadQueue->q_ptr = NULL;
    602         VbglGRFree(&pState->pMouseStatusReq->header);
     601        VbglR0GRFree(&pState->pMouseStatusReq->header);
    603602        VbglR0TerminateClient();
    604603    }
     
    13761375            pState->cMaxScreenY = pResolution->height - 1;
    13771376            /* Note: we don't disable this again until session close. */
    1378             rc = VbglSetMouseStatus(  VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE
    1379                                     | VMMDEV_MOUSE_NEW_PROTOCOL);
     1377            rc = VbglR0SetMouseStatus(  VMMDEV_MOUSE_GUEST_CAN_ABSOLUTE
     1378                                      | VMMDEV_MOUSE_NEW_PROTOCOL);
    13801379            if (RT_SUCCESS(rc))
    13811380                return 0;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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