Changeset 71626 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 2, 2018 9:12:58 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r71594 r71626 233 233 char *buf = (char*)malloc(VBOXVHWACMD_SIZE_FROMBODYSIZE(size)); 234 234 memset(buf, 0, size); 235 VBOXVHWACMD * pCmd = (VBOXVHWACMD*)buf;235 VBOXVHWACMD *pCmd = (VBOXVHWACMD *)buf; 236 236 pCmd->enmCmd = type; 237 237 pCmd->Flags = VBOXVHWACMD_FLAG_HH_CMD; … … 3195 3195 char *buf = (char*)malloc(VBOXVHWACMD_SIZE(VBOXVHWACMD_SURF_CREATE)); 3196 3196 memset(buf, 0, sizeof(VBOXVHWACMD_SIZE(VBOXVHWACMD_SURF_CREATE))); 3197 VBOXVHWACMD * pCmd = (VBOXVHWACMD*)buf;3197 VBOXVHWACMD *pCmd = (VBOXVHWACMD *)buf; 3198 3198 pCmd->enmCmd = VBOXVHWACMD_TYPE_SURF_CREATE; 3199 3199 pCmd->Flags = VBOXVHWACMD_FLAG_HH_CMD; … … 3347 3347 } 3348 3348 3349 int VBoxVHWAImage::vhwaLoadOverlayData(VHWACommandList * pCmdList, struct SSMHANDLE *pSSM, uint32_t u32Version)3349 int VBoxVHWAImage::vhwaLoadOverlayData(VHWACommandList *pCmdList, struct SSMHANDLE *pSSM, uint32_t u32Version) 3350 3350 { 3351 3351 Q_UNUSED(u32Version); … … 3510 3510 { 3511 3511 memset(buf, 0, sizeof(VBOXVHWACMD)); 3512 VBOXVHWACMD * pCmd = (VBOXVHWACMD*)buf;3512 VBOXVHWACMD *pCmd = (VBOXVHWACMD *)buf; 3513 3513 pCmd->enmCmd = VBOXVHWACMD_TYPE_ENABLE; 3514 3514 pCmd->Flags = VBOXVHWACMD_FLAG_HH_CMD; … … 4296 4296 } 4297 4297 4298 int VBoxQGLOverlay::onVHWACommand(struct VBOXVHWACMD *pCmd)4298 int VBoxQGLOverlay::onVHWACommand(struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd) 4299 4299 { 4300 4300 Log(("VHWA Command >>> %#p, %d\n", pCmd, pCmd->enmCmd)); … … 4400 4400 pCmd->Flags |= VBOXVHWACMD_FLAG_HG_ASYNCH; 4401 4401 4402 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_VHWA, pCmd);4402 mCmdPipe.postCmd(VBOXVHWA_PIPECMD_VHWA, (void *)pCmd); 4403 4403 return VINF_CALLBACK_RETURN; 4404 4404 … … 4527 4527 } 4528 4528 4529 void VBoxQGLOverlay::vboxDoVHWACmd(void *cmd)4529 void VBoxQGLOverlay::vboxDoVHWACmd(void RT_UNTRUSTED_VOLATILE_GUEST *cmd) 4530 4530 { 4531 4531 vboxDoVHWACmdExec(cmd); … … 4688 4688 } 4689 4689 4690 void VBoxQGLOverlay::vboxDoVHWACmdExec(void *cmd) 4691 { 4692 struct VBOXVHWACMD * pCmd = (struct VBOXVHWACMD *)cmd; 4693 switch(pCmd->enmCmd) 4690 void 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) 4694 4696 { 4695 4697 case VBOXVHWACMD_TYPE_SURF_CANCREATE: 4696 4698 { 4697 VBOXVHWACMD_SURF_CANCREATE RT_UNTRUSTED_VOLATILE_GUEST 4699 VBOXVHWACMD_SURF_CANCREATE RT_UNTRUSTED_VOLATILE_GUEST *pBody = VBOXVHWACMD_BODY(pCmd, VBOXVHWACMD_SURF_CANCREATE); 4698 4700 Assert(!mGlOn == !mOverlayImage.hasSurfaces()); 4699 4701 initGl(); … … 5043 5045 } 5044 5046 5045 void VBoxVHWACommandElementProcessor::postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * 5047 void VBoxVHWACommandElementProcessor::postCmd(VBOXVHWA_PIPECMD_TYPE aType, void *pvData) 5046 5048 { 5047 5049 QObject *pNotifyObject = NULL; … … 5239 5241 case VBOXVHWA_PIPECMD_VHWA: 5240 5242 { 5241 struct VBOXVHWACMD *pCmd = pCur->vhwaCmd();5243 struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd = pCur->vhwaCmd(); 5242 5244 pCmd->rc = VERR_INVALID_STATE; 5243 5245 Log(("VHWA Command <<< Async RESET %#p, %d\n", pCmd, pCmd->enmCmd)); 5244 pDisplay->CompleteVHWACommand((BYTE *)pCmd);5246 pDisplay->CompleteVHWACommand((BYTE *)pCmd); 5245 5247 } 5246 5248 break; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h
r71594 r71626 1220 1220 { 1221 1221 public: 1222 void setVHWACmd(struct VBOXVHWACMD *pCmd)1222 void setVHWACmd(struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd) 1223 1223 { 1224 1224 mType = VBOXVHWA_PIPECMD_VHWA; … … 1238 1238 } 1239 1239 1240 void setData(VBOXVHWA_PIPECMD_TYPE aType, void * 1240 void setData(VBOXVHWA_PIPECMD_TYPE aType, void *pvData) 1241 1241 { 1242 1242 switch(aType) … … 1259 1259 VBOXVHWA_PIPECMD_TYPE type() const {return mType;} 1260 1260 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;} 1262 1262 const VBOXVHWAFUNCCALLBACKINFO & func() const {return u.mFuncCallback; } 1263 1263 … … 1267 1267 union 1268 1268 { 1269 struct VBOXVHWACMD *mpCmd;1269 struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *mpCmd; 1270 1270 VBOXVHWAFUNCCALLBACKINFO mFuncCallback; 1271 1271 }u; … … 1321 1321 void init(QObject *pNotifyObject); 1322 1322 ~VBoxVHWACommandElementProcessor(); 1323 void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void * 1323 void postCmd(VBOXVHWA_PIPECMD_TYPE aType, void *pvData); 1324 1324 VBoxVHWACommandElement *getCmd(); 1325 1325 void doneCmd(); … … 1709 1709 void updateAttachment(QWidget *pViewport, QObject *pPostEventObject); 1710 1710 1711 int onVHWACommand (struct VBOXVHWACMD *pCommand);1711 int onVHWACommand (struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand); 1712 1712 1713 1713 void onVHWACommandEvent (QEvent * pEvent); … … 1799 1799 bool vboxGetGlOn() { return mGlOn; } 1800 1800 bool vboxSynchGl(); 1801 void vboxDoVHWACmdExec(void *cmd);1801 void vboxDoVHWACmdExec(void RT_UNTRUSTED_VOLATILE_GUEST *cmd); 1802 1802 void vboxShowOverlay (bool show); 1803 1803 void vboxDoCheckUpdateViewport(); 1804 void vboxDoVHWACmd (void *cmd);1804 void vboxDoVHWACmd (void RT_UNTRUSTED_VOLATILE_GUEST *cmd); 1805 1805 void addMainDirtyRect (const QRect & aRect); 1806 1806 void vboxCheckUpdateOverlay (const QRect & rect); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r71615 r71626 433 433 return E_ACCESSDENIED; 434 434 } 435 rc = mOverlay.onVHWACommand ((struct VBOXVHWACMD*)pCommand);435 rc = mOverlay.onVHWACommand((struct VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *)pCommand); 436 436 UIFrameBufferPrivate::unlock(); 437 437 if (rc == VINF_CALLBACK_RETURN)
Note:
See TracChangeset
for help on using the changeset viewer.