Changeset 71626 in vbox
- Timestamp:
- Apr 2, 2018 9:12:58 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmifs.h
r71619 r71626 843 843 * @param pInterface Pointer to this interface. 844 844 * @param enmCmd The command type (don't re-read from pCmd). 845 * @param fGuestCmd Set if the command origins with the guest and 846 * pCmd must be considered volatile. 845 847 * @param pCmd Video HW Acceleration Command to be processed. 846 * @returns VINF_SUCCESS - command is completed, 847 * VINF_CALLBACK_RETURN - command will by asynchronously completed via complete callback 848 * VERR_INVALID_STATE - the command could not be processed (most likely because the framebuffer was disconnected) - the post should be retried later 849 * @thread The emulation thread. 850 */ 851 DECLR3CALLBACKMEMBER(int, pfnVHWACommandProcess,(PPDMIDISPLAYCONNECTOR pInterface, int enmCmd, 848 * @retval VINF_SUCCESS - command is completed, 849 * @retval VINF_CALLBACK_RETURN if command will by asynchronously completed via 850 * complete callback. 851 * @retval VERR_INVALID_STATE if the command could not be processed (most 852 * likely because the framebuffer was disconnected) - the post should 853 * be retried later. 854 * @thread EMT 855 */ 856 DECLR3CALLBACKMEMBER(int, pfnVHWACommandProcess,(PPDMIDISPLAYCONNECTOR pInterface, int enmCmd, bool fGuestCmd, 852 857 VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd)); 853 858 … … 857 862 * @param pInterface Pointer to this interface. 858 863 * @param pCmd Video HW Acceleration Command to be processed. 859 * @thread The emulation thread.864 * @thread EMT 860 865 */ 861 866 DECLR3CALLBACKMEMBER(void, pfnCrHgsmiCommandProcess,(PPDMIDISPLAYCONNECTOR pInterface, … … 868 873 * @param pInterface Pointer to this interface. 869 874 * @param pCmd Video HW Acceleration Command to be processed. 870 * @thread The emulation thread.875 * @thread EMT 871 876 */ 872 877 DECLR3CALLBACKMEMBER(void, pfnCrHgsmiControlProcess,(PPDMIDISPLAYCONNECTOR pInterface, … … 882 887 * @param pfnCompletion Undocumented! 883 888 * @param pvCompletion Undocumented! 884 * @thread The emulation thread.889 * @thread EMT 885 890 */ 886 891 DECLR3CALLBACKMEMBER(int, pfnCrHgcmCtlSubmit,(PPDMIDISPLAYCONNECTOR pInterface, struct VBOXCRCMDCTL *pCmd, uint32_t cbCmd, -
trunk/src/VBox/Devices/Graphics/DevVGA_VBVA.cpp
r71622 r71626 773 773 if (cbPointerData > pCtx->mouseShapeInfo.cbAllocated) 774 774 { 775 RTMemFree 775 RTMemFree(pCtx->mouseShapeInfo.pu8Shape); 776 776 pCtx->mouseShapeInfo.pu8Shape = NULL; 777 777 pCtx->mouseShapeInfo.cbShape = 0; 778 778 779 uint8_t *pu8Shape = (uint8_t *)RTMemAlloc 779 uint8_t *pu8Shape = (uint8_t *)RTMemAlloc(cbPointerData); 780 780 if (pu8Shape) 781 781 { … … 1004 1004 RTListForEach(&pVGAState->pendingVhwaCommands.PendingList, pIter, VBOX_VHWA_PENDINGCMD, Node) 1005 1005 { 1006 rc = SSMR3PutU32(pSSM, (uint32_t)(((uint8_t*)pIter->pCommand) - ((uint8_t*)pVGAState->vram_ptrR3))); 1006 AssertContinue((uintptr_t)pIter->pCommand - (uintptr_t)pVGAState->vram_ptrR3 < pVGAState->vram_size); 1007 rc = SSMR3PutU32(pSSM, (uint32_t)(((uint8_t *)pIter->pCommand) - ((uint8_t *)pVGAState->vram_ptrR3))); 1007 1008 AssertRCReturn(rc, rc); 1008 1009 } … … 1031 1032 1032 1033 1034 /** Worker for vbvaVHWACommandSubmit. */ 1035 static bool vbvaVHWACommandSubmitInner(PVGASTATE pVGAState, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand, bool *pfPending) 1036 { 1037 *pfPending = false; 1038 1039 /* 1040 * Read the command type and validate it and our driver state. 1041 */ 1042 VBOXVHWACMD_TYPE enmCmd = pCommand->enmCmd; 1043 RT_UNTRUSTED_NONVOLATILE_COPY_FENCE(); 1044 1045 bool fGuestCmd = (uintptr_t)pCommand - (uintptr_t)pVGAState->vram_ptrR3 < pVGAState->vram_size; 1046 ASSERT_GUEST_LOGREL_MSG_STMT_RETURN( !fGuestCmd 1047 || ( enmCmd != VBOXVHWACMD_TYPE_HH_CONSTRUCT 1048 && enmCmd != VBOXVHWACMD_TYPE_HH_RESET 1049 && enmCmd != VBOXVHWACMD_TYPE_HH_DISABLE 1050 && enmCmd != VBOXVHWACMD_TYPE_HH_ENABLE 1051 && enmCmd != VBOXVHWACMD_TYPE_HH_SAVESTATE_SAVEBEGIN 1052 && enmCmd != VBOXVHWACMD_TYPE_HH_SAVESTATE_SAVEEND 1053 && enmCmd != VBOXVHWACMD_TYPE_HH_SAVESTATE_SAVEPERFORM 1054 && enmCmd != VBOXVHWACMD_TYPE_HH_SAVESTATE_LOADPERFORM), 1055 ("enmCmd=%d\n", enmCmd), 1056 pCommand->rc = VERR_INVALID_PARAMETER, 1057 true); 1058 ASSERT_GUEST_STMT_RETURN(pVGAState->pDrv->pfnVHWACommandProcess, pCommand->rc = VERR_INVALID_STATE, true); 1059 RT_UNTRUSTED_VALIDATED_FENCE(); 1060 1061 /* 1062 * Call the driver to process the command. 1063 */ 1064 Log(("VGA Command >>> %#p, %d\n", pCommand, enmCmd)); 1065 int rc = pVGAState->pDrv->pfnVHWACommandProcess(pVGAState->pDrv, enmCmd, fGuestCmd, pCommand); 1066 if (rc == VINF_CALLBACK_RETURN) 1067 { 1068 Log(("VGA Command --- Going Async %#p, %d\n", pCommand, enmCmd)); 1069 *pfPending = true; 1070 return true; /* Command will be completed asynchronously by the driver and need not be put in the pending list. */ 1071 } 1072 1073 if (rc == VERR_INVALID_STATE) 1074 { 1075 Log(("VGA Command --- Trying Pend %#p, %d\n", pCommand, enmCmd)); 1076 if (vbvaVHWACommandCanPend(enmCmd)) 1077 { 1078 Log(("VGA Command --- Can Pend %#p, %d\n", pCommand, enmCmd)); 1079 *pfPending = true; 1080 return false; /* put on pending list so it can be retried?? */ 1081 } 1082 1083 Log(("VGA Command --- Can NOT Pend %#p, %d\n", pCommand, enmCmd)); 1084 } 1085 else 1086 Log(("VGA Command --- Going Complete Sync rc %d %#p, %d\n", rc, pCommand, enmCmd)); 1087 1088 /* the command was completed, take a special care about it (see caller) */ 1089 pCommand->rc = rc; 1090 return true; 1091 } 1092 1093 1033 1094 static bool vbvaVHWACommandSubmit(PVGASTATE pVGAState, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand, bool fAsyncCommand) 1034 1095 { 1035 VBOXVHWACMD_TYPE enmCmd = pCommand->enmCmd; 1036 ASMCompilerBarrier(); 1037 1038 bool fPend = false; 1039 if (pVGAState->pDrv->pfnVHWACommandProcess) 1040 { 1041 Log(("VGA Command >>> %#p, %d\n", pCommand, enmCmd)); 1042 int rc = pVGAState->pDrv->pfnVHWACommandProcess(pVGAState->pDrv, enmCmd, pCommand); 1043 if (rc == VINF_CALLBACK_RETURN) 1044 { 1045 Log(("VGA Command --- Going Async %#p, %d\n", pCommand, enmCmd)); 1046 return true; /* command will be completed asynchronously, return right away */ 1047 } 1048 if (rc == VERR_INVALID_STATE) 1049 { 1050 Log(("VGA Command --- Trying Pend %#p, %d\n", pCommand, enmCmd)); 1051 fPend = vbvaVHWACommandCanPend(enmCmd); 1052 if (!fPend) 1053 { 1054 Log(("VGA Command --- Can NOT Pend %#p, %d\n", pCommand, enmCmd)); 1055 pCommand->rc = rc; 1056 } 1057 else 1058 Log(("VGA Command --- Can Pend %#p, %d\n", pCommand, enmCmd)); 1059 } 1060 else 1061 { 1062 Log(("VGA Command --- Going Complete Sync rc %d %#p, %d\n", rc, pCommand, enmCmd)); 1063 pCommand->rc = rc; 1064 } 1065 1066 /* the command was completed, take a special care about it (seee below) */ 1067 } 1068 else 1069 { 1070 AssertFailed(); 1071 pCommand->rc = VERR_INVALID_STATE; 1072 } 1073 1074 if (fPend) 1075 return false; 1076 1077 vbvaVHWACommandComplete(pVGAState, pCommand, fAsyncCommand); 1078 1079 return true; 1080 } 1081 1096 bool fPending = false; 1097 bool fRet = vbvaVHWACommandSubmitInner(pVGAState, pCommand, &fPending); 1098 if (!fPending) 1099 vbvaVHWACommandComplete(pVGAState, pCommand, fAsyncCommand); 1100 return fRet; 1101 } 1102 1103 1104 /** 1105 * @returns false if commands are pending, otherwise true. 1106 */ 1082 1107 static bool vbvaVHWACheckPendingCommands(PVGASTATE pVGAState) 1083 1108 { … … 1093 1118 { 1094 1119 PDMCritSectLeave(&pVGAState->CritSect); 1095 return false; /* the command should be pended still*/1120 return false; /* the command should be still pending */ 1096 1121 } 1097 1122 … … 1111 1136 vbvaVHWACheckPendingCommands(pVGAState); 1112 1137 } 1138 1113 1139 static void vbvaVHWAHandleCommand(PVGASTATE pVGAState, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd) 1114 1140 { … … 1127 1153 } 1128 1154 1129 static int vbvaVHWAHHCommandPost(PVGASTATE pVGAState, VBOXVHWACMD *pCmd)1155 static int vbvaVHWAHHCommandPost(PVGASTATE pVGAState, VBOXVHWACMD *pCmd) 1130 1156 { 1131 1157 RTSEMEVENT hComplEvent; 1132 1158 int rc = RTSemEventCreate(&hComplEvent); 1133 1159 AssertRC(rc); 1134 if (RT_SUCCESS(rc))1160 if (RT_SUCCESS(rc)) 1135 1161 { 1136 1162 /* ensure the cmd is not deleted until we process it */ 1137 vbvaVHWAHHCommandRetain (pCmd); 1138 VBOXVHWA_HH_CALLBACK_SET(pCmd, vbvaVHWAHHCommandSetEventCallback, (void*)hComplEvent); 1163 vbvaVHWAHHCommandRetain(pCmd); 1164 1165 VBOXVHWA_HH_CALLBACK_SET(pCmd, vbvaVHWAHHCommandSetEventCallback, (void *)hComplEvent); 1139 1166 vbvaVHWAHandleCommand(pVGAState, pCmd); 1140 if((ASMAtomicReadU32((volatile uint32_t *)&pCmd->Flags) & VBOXVHWACMD_FLAG_HG_ASYNCH) != 0) 1141 { 1142 rc = RTSemEventWaitNoResume(hComplEvent, RT_INDEFINITE_WAIT); 1143 } 1144 else 1145 { 1146 /* the command is completed */ 1147 } 1167 1168 if ((ASMAtomicReadU32((volatile uint32_t *)&pCmd->Flags) & VBOXVHWACMD_FLAG_HG_ASYNCH) != 0) 1169 rc = RTSemEventWaitNoResume(hComplEvent, RT_INDEFINITE_WAIT); /** @todo Why the NoResume and event leaking here? */ 1170 /* else: the command is completed */ 1148 1171 1149 1172 AssertRC(rc); 1150 if(RT_SUCCESS(rc)) 1151 { 1173 if (RT_SUCCESS(rc)) 1152 1174 RTSemEventDestroy(hComplEvent); 1153 } 1175 1154 1176 vbvaVHWAHHCommandRelease(pCmd); 1155 1177 } … … 1222 1244 VBOXVHWACMD *pCmd = vbvaVHWAHHCommandCreate(VBOXVHWACMD_TYPE_HH_RESET, 0, 0); 1223 1245 Assert(pCmd); 1224 if (pCmd)1246 if (pCmd) 1225 1247 { 1226 1248 int rc = VINF_SUCCESS; … … 1229 1251 do 1230 1252 { 1231 rc = vbvaVHWAHHCommandPost(pVGAState, pCmd);1253 rc = vbvaVHWAHHCommandPost(pVGAState, pCmd); 1232 1254 AssertRC(rc); 1233 1255 if(RT_SUCCESS(rc)) … … 1333 1355 } 1334 1356 1357 /** 1358 * @interface_method_impl{PDMIDISPLAYVBVACALLBACKS,pfnVHWACommandCompleteAsync} 1359 */ 1335 1360 DECLCALLBACK(int) vbvaVHWACommandCompleteAsync(PPDMIDISPLAYVBVACALLBACKS pInterface, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCmd) 1336 1361 { 1362 PVGASTATE pVGAState = PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(pInterface); 1337 1363 int rc; 1338 1364 Log(("VGA Command <<< Async rc %d %#p, %d\n", pCmd->rc, pCmd, pCmd->enmCmd)); 1339 1365 1340 if ((pCmd->Flags & VBOXVHWACMD_FLAG_HH_CMD) == 0) 1341 { 1342 PVGASTATE pVGAState = PPDMIDISPLAYVBVACALLBACKS_2_PVGASTATE(pInterface); 1366 if ((uintptr_t)pCmd - (uintptr_t)pVGAState->vram_ptrR3 < pVGAState->vram_size) 1367 { 1343 1368 PHGSMIINSTANCE pIns = pVGAState->pHGSMI; 1344 1369 Assert(!(pCmd->Flags & VBOXVHWACMD_FLAG_HH_CMD)); 1345 1370 Assert(pCmd->Flags & VBOXVHWACMD_FLAG_HG_ASYNCH); 1346 1371 #ifdef VBOX_WITH_WDDM … … 1410 1435 else 1411 1436 { 1437 Assert(pCmd->Flags & VBOXVHWACMD_FLAG_HH_CMD); 1412 1438 PFNVBOXVHWA_HH_CALLBACK pfn = VBOXVHWA_HH_CALLBACK_GET(pCmd); 1413 1439 if (pfn) … … 2324 2350 VBVACONTEXT *pCtx = (VBVACONTEXT *)HGSMIContext(pIns); 2325 2351 2352 /* 2353 * Copy and validate the request. 2354 */ 2326 2355 uint16_t const cHintsQueried = pQueryModeHints->cHintsQueried; 2327 2356 uint16_t const cbHintStructureGuest = pQueryModeHints->cbHintStructureGuest; 2328 ASMCompilerBarrier();2357 RT_UNTRUSTED_NONVOLATILE_COPY_FENCE(); 2329 2358 2330 2359 LogRelFlowFunc(("VBVA: HandleQueryModeHints: cHintsQueried=%RU16, cbHintStructureGuest=%RU16\n", 2331 2360 cHintsQueried, cbHintStructureGuest)); 2332 if (cbBuffer < sizeof(VBVAQUERYMODEHINTS) + (uint32_t)cHintsQueried * cbHintStructureGuest) 2333 return VERR_INVALID_PARAMETER; 2334 2361 ASSERT_GUEST_RETURN(cbBuffer >= sizeof(VBVAQUERYMODEHINTS) + (uint32_t)cHintsQueried * cbHintStructureGuest, 2362 VERR_INVALID_PARAMETER); 2363 RT_UNTRUSTED_VALIDATED_FENCE(); 2364 2365 /* 2366 * Produce the requested data. 2367 */ 2335 2368 uint8_t *pbHint = (uint8_t *)(pQueryModeHints + 1); 2336 2369 memset(pbHint, ~0, cbBuffer - sizeof(VBVAQUERYMODEHINTS)); … … 2582 2615 if (cbBuffer >= sizeof(VBVAQUERYMODEHINTS)) 2583 2616 { 2584 VBVAQUERYMODEHINTS RT_UNTRUSTED_VOLATILE_GUEST *pQueryModeHints ;2585 pQueryModeHints= (VBVAQUERYMODEHINTS RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer;2617 VBVAQUERYMODEHINTS RT_UNTRUSTED_VOLATILE_GUEST *pQueryModeHints 2618 = (VBVAQUERYMODEHINTS RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer; 2586 2619 rc = vbvaHandleQueryModeHints(pVGAState, pQueryModeHints, cbBuffer); 2587 2620 pQueryModeHints->rc = rc; … … 2598 2631 VBVAREPORTINPUTMAPPING RT_UNTRUSTED_VOLATILE_GUEST *pInputMapping 2599 2632 = (VBVAREPORTINPUTMAPPING RT_UNTRUSTED_VOLATILE_GUEST *)pvBuffer; 2600 inputMapping.x = pInputMapping->x;2601 inputMapping.y = pInputMapping->y;2633 inputMapping.x = pInputMapping->x; 2634 inputMapping.y = pInputMapping->y; 2602 2635 inputMapping.cx = pInputMapping->cx; 2603 2636 inputMapping.cy = pInputMapping->cy; -
trunk/src/VBox/Devices/Graphics/HGSMI/HGSMIHost.cpp
r71619 r71626 983 983 */ 984 984 int rc = hgsmiHostHeapLock(pIns); 985 AssertR eturn(rc, rc);985 AssertRCReturn(rc, rc); 986 986 987 987 /* It is possible to change the heap only if there is no pending allocations. */ -
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) -
trunk/src/VBox/Main/include/DisplayImpl.h
r71619 r71626 169 169 void i_handleUpdateVBVAInputMapping(int32_t xOrigin, int32_t yOrigin, uint32_t cx, uint32_t cy); 170 170 #ifdef VBOX_WITH_VIDEOHWACCEL 171 int i_handleVHWACommandProcess(int enmCmd, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand);171 int i_handleVHWACommandProcess(int enmCmd, bool fGuestCmd, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand); 172 172 #endif 173 173 #ifdef VBOX_WITH_CRHGSMI … … 338 338 339 339 #ifdef VBOX_WITH_VIDEOHWACCEL 340 static DECLCALLBACK(int) i_displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, int enmCmd, 340 static DECLCALLBACK(int) i_displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, int enmCmd, bool fGuestCmd, 341 341 VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand); 342 342 #endif -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r71619 r71626 3531 3531 #endif 3532 3532 3533 int Display::i_handleVHWACommandProcess(int enmCmd, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand)3533 int Display::i_handleVHWACommandProcess(int enmCmd, bool fGuestCmd, VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand) 3534 3534 { 3535 3535 unsigned id = (unsigned)pCommand->iDisplay; … … 3546 3546 return VERR_NOT_IMPLEMENTED; /* Implementation is not available. */ 3547 3547 3548 NOREF(enmCmd);3549 HRESULT hr = pFramebuffer->ProcessVHWACommand((BYTE *)pCommand);3548 RT_NOREF(enmCmd, fGuestCmd); 3549 HRESULT hr = pFramebuffer->ProcessVHWACommand((BYTE *)pCommand); 3550 3550 if (hr == S_FALSE) 3551 3551 return VINF_SUCCESS; … … 3559 3559 } 3560 3560 3561 DECLCALLBACK(int) Display::i_displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, int enmCmd, 3561 DECLCALLBACK(int) Display::i_displayVHWACommandProcess(PPDMIDISPLAYCONNECTOR pInterface, int enmCmd, bool fGuestCmd, 3562 3562 VBOXVHWACMD RT_UNTRUSTED_VOLATILE_GUEST *pCommand) 3563 3563 { 3564 3564 PDRVMAINDISPLAY pDrv = PDMIDISPLAYCONNECTOR_2_MAINDISPLAY(pInterface); 3565 3565 3566 return pDrv->pDisplay->i_handleVHWACommandProcess(enmCmd, pCommand);3566 return pDrv->pDisplay->i_handleVHWACommandProcess(enmCmd, fGuestCmd, pCommand); 3567 3567 } 3568 3568 #endif
Note:
See TracChangeset
for help on using the changeset viewer.