Changeset 71612 in vbox
- Timestamp:
- Apr 2, 2018 2:00:07 AM (7 years ago)
- Location:
- trunk/src/VBox/Devices/Graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r71607 r71612 2469 2469 if (cbBuffer >= VBoxSHGSMIBufferHeaderSize() + sizeof(VBOXCMDVBVA_CTL)) 2470 2470 { 2471 VBOXCMDVBVA_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCtl ;2472 pCtl= (VBOXCMDVBVA_CTL RT_UNTRUSTED_VOLATILE_GUEST *)VBoxSHGSMIBufferData((VBOXSHGSMIHEADER RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer);2471 VBOXCMDVBVA_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCtl 2472 = (VBOXCMDVBVA_CTL RT_UNTRUSTED_VOLATILE_GUEST *)VBoxSHGSMIBufferData((VBOXSHGSMIHEADER RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer); 2473 2473 rc = vboxCmdVBVACmdCtl(pVGAState, pCtl, cbBuffer - VBoxSHGSMIBufferHeaderSize()); 2474 2474 } … … 2482 2482 if (cbBuffer >= VBoxSHGSMIBufferHeaderSize() + sizeof(VBOXVDMACBUF_DR)) 2483 2483 { 2484 VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_GUEST *pCmd ;2485 pCmd= (VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_GUEST *)VBoxSHGSMIBufferData((VBOXSHGSMIHEADER RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer);2484 VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_GUEST *pCmd 2485 = (VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_GUEST *)VBoxSHGSMIBufferData((VBOXSHGSMIHEADER RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer); 2486 2486 vboxVDMACommand(pVGAState->pVdma, pCmd, cbBuffer - VBoxSHGSMIBufferHeaderSize()); 2487 2487 rc = VINF_SUCCESS; … … 2494 2494 if (cbBuffer >= VBoxSHGSMIBufferHeaderSize() + sizeof(VBOXVDMA_CTL)) 2495 2495 { 2496 VBOXVDMA_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCmd ;2497 pCmd= (VBOXVDMA_CTL RT_UNTRUSTED_VOLATILE_GUEST *)VBoxSHGSMIBufferData((VBOXSHGSMIHEADER RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer);2496 VBOXVDMA_CTL RT_UNTRUSTED_VOLATILE_GUEST *pCmd 2497 = (VBOXVDMA_CTL RT_UNTRUSTED_VOLATILE_GUEST *)VBoxSHGSMIBufferData((VBOXSHGSMIHEADER RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer); 2498 2498 vboxVDMAControl(pVGAState->pVdma, pCmd, cbBuffer - VBoxSHGSMIBufferHeaderSize()); 2499 2499 } -
trunk/src/VBox/Devices/Graphics/DevVGA_VDMA.cpp
r71611 r71612 3730 3730 RT_UNTRUSTED_NONVOLATILE_COPY_FENCE(); 3731 3731 3732 switch (uType) 3733 { 3734 case VBOXCMDVBVACTL_TYPE_3DCTL: 3735 return vdmaVBVACtlGenericGuestSubmit(pVdma, VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE, pCtl, cbCtl); 3736 3737 case VBOXCMDVBVACTL_TYPE_RESIZE: 3738 return vdmaVBVACtlGenericGuestSubmit(pVdma, VBVAEXHOSTCTL_TYPE_GHH_RESIZE, pCtl, cbCtl); 3739 3740 case VBOXCMDVBVACTL_TYPE_ENABLE: 3741 if (cbCtl == sizeof(VBOXCMDVBVA_CTL_ENABLE)) 3732 if ( uType == VBOXCMDVBVACTL_TYPE_3DCTL 3733 || uType == VBOXCMDVBVACTL_TYPE_RESIZE 3734 || uType == VBOXCMDVBVACTL_TYPE_ENABLE) 3735 { 3736 RT_UNTRUSTED_VALIDATED_FENCE(); 3737 3738 switch (uType) 3739 { 3740 case VBOXCMDVBVACTL_TYPE_3DCTL: 3741 return vdmaVBVACtlGenericGuestSubmit(pVdma, VBVAEXHOSTCTL_TYPE_GHH_BE_OPAQUE, pCtl, cbCtl); 3742 3743 case VBOXCMDVBVACTL_TYPE_RESIZE: 3744 return vdmaVBVACtlGenericGuestSubmit(pVdma, VBVAEXHOSTCTL_TYPE_GHH_RESIZE, pCtl, cbCtl); 3745 3746 case VBOXCMDVBVACTL_TYPE_ENABLE: 3747 ASSERT_GUEST_BREAK(cbCtl == sizeof(VBOXCMDVBVA_CTL_ENABLE)); 3742 3748 return vdmaVBVACtlEnableDisableSubmit(pVdma, (VBOXCMDVBVA_CTL_ENABLE RT_UNTRUSTED_VOLATILE_GUEST *)pCtl); 3743 WARN(("incorrect enable size\n")); 3744 break; 3745 default: 3746 WARN(("unsupported type\n")); 3747 break; 3749 3750 default: 3751 AssertFailed(); 3752 } 3748 3753 } 3749 3754
Note:
See TracChangeset
for help on using the changeset viewer.