VirtualBox

Ignore:
Timestamp:
Apr 2, 2018 9:12:58 PM (7 years ago)
Author:
vboxsync
Message:

DevVGA,VBoxC: Code cleanup in progress. bugref:9094

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp

    r71594 r71626  
    233233    char *buf = (char*)malloc(VBOXVHWACMD_SIZE_FROMBODYSIZE(size));
    234234    memset(buf, 0, size);
    235     VBOXVHWACMD * pCmd = (VBOXVHWACMD*)buf;
     235    VBOXVHWACMD *pCmd = (VBOXVHWACMD *)buf;
    236236    pCmd->enmCmd = type;
    237237    pCmd->Flags = VBOXVHWACMD_FLAG_HH_CMD;
     
    31953195    char *buf = (char*)malloc(VBOXVHWACMD_SIZE(VBOXVHWACMD_SURF_CREATE));
    31963196    memset(buf, 0, sizeof(VBOXVHWACMD_SIZE(VBOXVHWACMD_SURF_CREATE)));
    3197     VBOXVHWACMD * pCmd = (VBOXVHWACMD*)buf;
     3197    VBOXVHWACMD *pCmd = (VBOXVHWACMD *)buf;
    31983198    pCmd->enmCmd = VBOXVHWACMD_TYPE_SURF_CREATE;
    31993199    pCmd->Flags = VBOXVHWACMD_FLAG_HH_CMD;
     
    33473347}
    33483348
    3349 int VBoxVHWAImage::vhwaLoadOverlayData(VHWACommandList * pCmdList, struct SSMHANDLE * pSSM, uint32_t u32Version)
     3349int VBoxVHWAImage::vhwaLoadOverlayData(VHWACommandList *pCmdList, struct SSMHANDLE *pSSM, uint32_t u32Version)
    33503350{
    33513351    Q_UNUSED(u32Version);
     
    35103510    {
    35113511        memset(buf, 0, sizeof(VBOXVHWACMD));
    3512         VBOXVHWACMD * pCmd = (VBOXVHWACMD*)buf;
     3512        VBOXVHWACMD *pCmd = (VBOXVHWACMD *)buf;
    35133513        pCmd->enmCmd = VBOXVHWACMD_TYPE_ENABLE;
    35143514        pCmd->Flags = VBOXVHWACMD_FLAG_HH_CMD;
     
    42964296}
    42974297
    4298 int VBoxQGLOverlay::onVHWACommand(struct VBOXVHWACMD * pCmd)
     4298int VBoxQGLOverlay::onVHWACommand(struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd)
    42994299{
    43004300    Log(("VHWA Command >>> %#p, %d\n", pCmd, pCmd->enmCmd));
     
    44004400    pCmd->Flags |= VBOXVHWACMD_FLAG_HG_ASYNCH;
    44014401
    4402     mCmdPipe.postCmd(VBOXVHWA_PIPECMD_VHWA, pCmd);
     4402    mCmdPipe.postCmd(VBOXVHWA_PIPECMD_VHWA, (void *)pCmd);
    44034403    return VINF_CALLBACK_RETURN;
    44044404
     
    45274527}
    45284528
    4529 void VBoxQGLOverlay::vboxDoVHWACmd(void *cmd)
     4529void VBoxQGLOverlay::vboxDoVHWACmd(void RT_UNTRUSTED_VOLATILE_GUEST *cmd)
    45304530{
    45314531    vboxDoVHWACmdExec(cmd);
     
    46884688}
    46894689
    4690 void VBoxQGLOverlay::vboxDoVHWACmdExec(void *cmd)
    4691 {
    4692     struct VBOXVHWACMD * pCmd = (struct VBOXVHWACMD *)cmd;
    4693     switch(pCmd->enmCmd)
     4690void VBoxQGLOverlay::vboxDoVHWACmdExec(void RT_UNTRUSTED_VOLATILE_GUEST *cmd)
     4691{
     4692    struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd = (struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *)cmd;
     4693    VBOXVHWACMD_TYPE enmCmd = pCmd->enmCmd;
     4694    RT_UNTRUSTED_NONVOLATILE_COPY_FENCE();
     4695    switch (enmCmd)
    46944696    {
    46954697        case VBOXVHWACMD_TYPE_SURF_CANCREATE:
    46964698        {
    4697             VBOXVHWACMD_SURF_CANCREATE RT_UNTRUSTED_VOLATILE_GUEST  *pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_CANCREATE);
     4699            VBOXVHWACMD_SURF_CANCREATE RT_UNTRUSTED_VOLATILE_GUEST *pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_CANCREATE);
    46984700            Assert(!mGlOn == !mOverlayImage.hasSurfaces());
    46994701            initGl();
     
    50435045}
    50445046
    5045 void VBoxVHWACommandElementProcessor::postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData)
     5047void VBoxVHWACommandElementProcessor::postCmd(VBOXVHWA_PIPECMD_TYPE aType, void *pvData)
    50465048{
    50475049    QObject *pNotifyObject = NULL;
     
    52395241        case VBOXVHWA_PIPECMD_VHWA:
    52405242            {
    5241                 struct VBOXVHWACMD * pCmd = pCur->vhwaCmd();
     5243                struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd = pCur->vhwaCmd();
    52425244                pCmd->rc = VERR_INVALID_STATE;
    52435245                Log(("VHWA Command <<< Async RESET %#p, %d\n", pCmd, pCmd->enmCmd));
    5244                 pDisplay->CompleteVHWACommand((BYTE*)pCmd);
     5246                pDisplay->CompleteVHWACommand((BYTE *)pCmd);
    52455247            }
    52465248            break;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h

    r71594 r71626  
    12201220{
    12211221public:
    1222     void setVHWACmd(struct VBOXVHWACMD * pCmd)
     1222    void setVHWACmd(struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd)
    12231223    {
    12241224        mType = VBOXVHWA_PIPECMD_VHWA;
     
    12381238    }
    12391239
    1240     void setData(VBOXVHWA_PIPECMD_TYPE aType, void * pvData)
     1240    void setData(VBOXVHWA_PIPECMD_TYPE aType, void *pvData)
    12411241    {
    12421242        switch(aType)
     
    12591259    VBOXVHWA_PIPECMD_TYPE type() const {return mType;}
    12601260    const QRect & rect() const {return mRect;}
    1261     struct VBOXVHWACMD * vhwaCmd() const {return u.mpCmd;}
     1261    struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *vhwaCmd() const {return u.mpCmd;}
    12621262    const VBOXVHWAFUNCCALLBACKINFO & func() const {return u.mFuncCallback; }
    12631263
     
    12671267    union
    12681268    {
    1269         struct VBOXVHWACMD * mpCmd;
     1269        struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *mpCmd;
    12701270        VBOXVHWAFUNCCALLBACKINFO mFuncCallback;
    12711271    }u;
     
    13211321    void init(QObject *pNotifyObject);
    13221322    ~VBoxVHWACommandElementProcessor();
    1323     void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * pvData);
     1323    void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void *pvData);
    13241324    VBoxVHWACommandElement *getCmd();
    13251325    void doneCmd();
     
    17091709    void updateAttachment(QWidget *pViewport, QObject *pPostEventObject);
    17101710
    1711     int onVHWACommand (struct VBOXVHWACMD * pCommand);
     1711    int onVHWACommand (struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand);
    17121712
    17131713    void onVHWACommandEvent (QEvent * pEvent);
     
    17991799    bool vboxGetGlOn() { return mGlOn; }
    18001800    bool vboxSynchGl();
    1801     void vboxDoVHWACmdExec(void *cmd);
     1801    void vboxDoVHWACmdExec(void RT_UNTRUSTED_VOLATILE_GUEST *cmd);
    18021802    void vboxShowOverlay (bool show);
    18031803    void vboxDoCheckUpdateViewport();
    1804     void vboxDoVHWACmd (void *cmd);
     1804    void vboxDoVHWACmd (void RT_UNTRUSTED_VOLATILE_GUEST *cmd);
    18051805    void addMainDirtyRect (const QRect & aRect);
    18061806    void vboxCheckUpdateOverlay (const QRect & rect);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r71615 r71626  
    433433            return E_ACCESSDENIED;
    434434        }
    435         rc = mOverlay.onVHWACommand ((struct VBOXVHWACMD*)pCommand);
     435        rc = mOverlay.onVHWACommand((struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *)pCommand);
    436436        UIFrameBufferPrivate::unlock();
    437437        if (rc == VINF_CALLBACK_RETURN)
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