VirtualBox

Changeset 71893 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Apr 18, 2018 10:55:06 AM (7 years ago)
Author:
vboxsync
Message:

DevVGA: Code cleanup in progress. bugref:9094

File:
1 edited

Legend:

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

    r71619 r71893  
    27202720 *                      be set to true.
    27212721 */
    2722 static int vboxVDMACmdExec(PVBOXVDMAHOST pVdma, const uint8_t *pbBuffer, uint32_t cbBuffer,
     2722static int vboxVDMACmdExec(PVBOXVDMAHOST pVdma, uint8_t const RT_UNTRUSTED_VOLATILE_GUEST *pbBuffer, uint32_t cbBuffer,
    27232723                           VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_GUEST *pCmdDr, bool *pfAsyncCmd)
    27242724{
     
    27292729        AssertReturn(cbBuffer >= VBOXVDMACMD_HEADER_SIZE(), VERR_INVALID_PARAMETER);
    27302730
    2731         VBOXVDMACMD const  *pCmd       = (VBOXVDMACMD const *)pbBuffer;
    2732         VBOXVDMACMD_TYPE    enmCmdType = pCmd->enmType;
    2733         int                 cbProcessed;
     2731        VBOXVDMACMD const RT_UNTRUSTED_VOLATILE_GUEST  *pCmd       = (VBOXVDMACMD const RT_UNTRUSTED_VOLATILE_GUEST *)pbBuffer;
     2732        VBOXVDMACMD_TYPE                                enmCmdType = pCmd->enmType;
     2733        RT_UNTRUSTED_NONVOLATILE_COPY_FENCE();
     2734
     2735        ASSERT_GUEST_MSG_RETURN(   enmCmdType == VBOXVDMACMD_TYPE_CHROMIUM_CMD
     2736                                || enmCmdType == VBOXVDMACMD_TYPE_DMA_PRESENT_BLT
     2737                                || enmCmdType == VBOXVDMACMD_TYPE_DMA_BPB_TRANSFER
     2738                                || enmCmdType == VBOXVDMACMD_TYPE_DMA_NOP
     2739                                || enmCmdType == VBOXVDMACMD_TYPE_CHILD_STATUS_IRQ,
     2740                                ("enmCmdType=%d\n", enmCmdType),
     2741                                VERR_INVALID_FUNCTION);
     2742        RT_UNTRUSTED_VALIDATED_FENCE();
     2743
     2744        int cbProcessed;
    27342745        switch (enmCmdType)
    27352746        {
     
    29172928     * Process the command.
    29182929     */
    2919     int rc = vboxVDMACmdExec(pVdma, (uint8_t const *)pbCmdBuf, cbCmdBuf, pCmd, pfAsyncCmd); /** @todo fixme later */
     2930    int rc = vboxVDMACmdExec(pVdma, pbCmdBuf, cbCmdBuf, pCmd, pfAsyncCmd);
    29202931    AssertRC(rc);
    29212932
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