VirtualBox

Ignore:
Timestamp:
Mar 31, 2018 6:34:28 PM (7 years ago)
Author:
vboxsync
Message:

DevVGA,HGSMI,++: Code cleanup in progress. bugref:9094

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp

    r71588 r71590  
    23982398 * @note    cbCmdDr is at least sizeof(VBOXVDMACBUF_DR).
    23992399 */
    2400 static int vboxVDMACmdCheckCrCmd(struct VBOXVDMAHOST *pVdma, PVBOXVDMACBUF_DR pCmdDr, uint32_t cbCmdDr)
     2400static int vboxVDMACmdCheckCrCmd(struct VBOXVDMAHOST *pVdma, VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_GUEST *pCmdDr, uint32_t cbCmdDr)
    24012401{
    24022402    uint32_t cbDmaCmd = 0;
     
    29482948 * @thread  VDMA
    29492949 */
    2950 static void vboxVDMACommandProcess(PVBOXVDMAHOST pVdma, PVBOXVDMACBUF_DR pCmd, uint32_t cbCmd)
     2950static void vboxVDMACommandProcess(PVBOXVDMAHOST pVdma, VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_GUEST *pCmd, uint32_t cbCmd)
    29512951{
    29522952    PHGSMIINSTANCE pHgsmi = pVdma->pHgsmi;
     
    29582958         * Get the command buffer (volatile).
    29592959         */
    2960         uint16_t const  cbCmdBuf = pCmd->cbBuf;
    2961         const uint8_t  *pbCmdBuf;
     2960        uint16_t const  cbCmdBuf  = pCmd->cbBuf;
     2961        uint32_t const  fCmdFlags = pCmd->fFlags;
     2962        const uint8_t  *pbCmdBuf; /** @todo fixme later */
    29622963        PGMPAGEMAPLOCK  Lock;
    29632964        bool            bReleaseLocked = false;
    2964         if (pCmd->fFlags & VBOXVDMACBUF_FLAG_BUF_FOLLOWS_DR)
     2965        if (fCmdFlags & VBOXVDMACBUF_FLAG_BUF_FOLLOWS_DR)
    29652966        {
    29662967            pbCmdBuf = VBOXVDMACBUF_DR_TAIL(pCmd, const uint8_t);
     
    29692970                            rc = VERR_INVALID_PARAMETER);
    29702971        }
    2971         else if (pCmd->fFlags & VBOXVDMACBUF_FLAG_BUF_VRAM_OFFSET)
     2972        else if (fCmdFlags & VBOXVDMACBUF_FLAG_BUF_VRAM_OFFSET)
    29722973        {
    29732974            uint64_t offVRam = pCmd->Location.offVramBuf;
     
    31653166 * @param   cbCmd   The size of the command.  At least sizeof(VBOXVDMA_CTL).
    31663167 */
    3167 void vboxVDMAControl(struct VBOXVDMAHOST *pVdma, PVBOXVDMA_CTL pCmd, uint32_t cbCmd)
     3168void vboxVDMAControl(struct VBOXVDMAHOST *pVdma, VBOXVDMA_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCmd, uint32_t cbCmd)
    31683169{
    31693170    RT_NOREF(cbCmd);
     
    31713172
    31723173    VBOXVDMA_CTL_TYPE enmCtl = pCmd->enmCtl;
     3174    ASMCompilerBarrier();
    31733175    switch (enmCtl)
    31743176    {
     
    32043206 * @param   cbCmd   The size of the command.  At least sizeof(VBOXVDMACBUF_DR).
    32053207 */
    3206 void vboxVDMACommand(struct VBOXVDMAHOST *pVdma, PVBOXVDMACBUF_DR pCmd, uint32_t cbCmd)
     3208void vboxVDMACommand(struct VBOXVDMAHOST *pVdma, VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_GUEST *pCmd, uint32_t cbCmd)
    32073209{
    32083210#ifdef VBOX_WITH_CRHGSMI
     
    32823284 * Handler for vboxCmdVBVACmdCtl()/VBOXCMDVBVACTL_TYPE_3DCTL.
    32833285 */
    3284 static int vdmaVBVACtlGenericGuestSubmit(PVBOXVDMAHOST pVdma, VBVAEXHOSTCTL_TYPE enmType, VBOXCMDVBVA_CTL *pCtl, uint32_t cbCtl)
     3286static int vdmaVBVACtlGenericGuestSubmit(PVBOXVDMAHOST pVdma, VBVAEXHOSTCTL_TYPE enmType,
     3287                                         VBOXCMDVBVA_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCtl, uint32_t cbCtl)
    32853288{
    32863289    Assert(cbCtl >= sizeof(VBOXCMDVBVA_CTL)); /* Checked by callers caller, vbvaChannelHandler(). */
     
    37913794 *                              sizeof(VBOXCMDVBVA_CTL).
    37923795 */
    3793 int vboxCmdVBVACmdCtl(PVGASTATE pVGAState, VBOXCMDVBVA_CTL *pCtl, uint32_t cbCtl)
     3796int vboxCmdVBVACmdCtl(PVGASTATE pVGAState, VBOXCMDVBVA_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCtl, uint32_t cbCtl)
    37943797{
    37953798    struct VBOXVDMAHOST *pVdma = pVGAState->pVdma;
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