Changeset 71595 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/mp
- Timestamp:
- Mar 31, 2018 8:24:41 PM (7 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPCr.cpp
r71590 r71595 262 262 263 263 264 static int vboxMpCrShgsmiTransportCmdSubmitDr(PVBOXMP_CRSHGSMITRANSPORT pCon, PVBOXVDMACBUF_DRpDr,264 static int vboxMpCrShgsmiTransportCmdSubmitDr(PVBOXMP_CRSHGSMITRANSPORT pCon, VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_HOST *pDr, 265 265 PFNVBOXVDMADDICMDCOMPLETE_DPC pfnComplete) 266 266 { … … 281 281 } 282 282 283 static int vboxMpCrShgsmiTransportCmdSubmitDmaCmd(PVBOXMP_CRSHGSMITRANSPORT pCon, PVBOXVDMACMDpHdr,283 static int vboxMpCrShgsmiTransportCmdSubmitDmaCmd(PVBOXMP_CRSHGSMITRANSPORT pCon, VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr, 284 284 PFNVBOXVDMADDICMDCOMPLETE_DPC pfnComplete) 285 285 { 286 PVBOXVDMACBUF_DRpDr = VBOXVDMACBUF_DR_FROM_TAIL(pHdr);286 VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_HOST *pDr = VBOXVDMACBUF_DR_FROM_TAIL(pHdr); 287 287 return vboxMpCrShgsmiTransportCmdSubmitDr(pCon, pDr, pfnComplete); 288 288 } 289 289 290 static void vboxMpCrShgsmiTransportCmdTermDmaCmd(PVBOXMP_CRSHGSMITRANSPORT pCon, PVBOXVDMACMDpHdr)291 { 292 PVBOXVDMACBUF_DRpDr = VBOXVDMACBUF_DR_FROM_TAIL(pHdr);290 static void vboxMpCrShgsmiTransportCmdTermDmaCmd(PVBOXMP_CRSHGSMITRANSPORT pCon, VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr) 291 { 292 VBOXVDMACBUF_DR RT_UNTRUSTED_VOLATILE_HOST *pDr = VBOXVDMACBUF_DR_FROM_TAIL(pHdr); 293 293 PVBOXMP_DEVEXT pDevExt = pCon->pDevExt; 294 vboxVdmaCBufDrFree 294 vboxVdmaCBufDrFree(&pDevExt->u.primary.Vdma, pDr); 295 295 } 296 296 … … 308 308 Assert(KeGetCurrentIrql() == DISPATCH_LEVEL); 309 309 310 PVBOXMP_CRSHGSMITRANSPORT pCon= (PVBOXMP_CRSHGSMITRANSPORT)pvContext;311 PVBOXVDMACBUF_DR pDr= VBOXVDMACBUF_DR_FROM_DDI_CMD(pDdiCmd);312 PVBOXVDMACMD pHdr= VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);313 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr);314 const UINT cBuffers = 2;310 PVBOXMP_CRSHGSMITRANSPORT pCon = (PVBOXMP_CRSHGSMITRANSPORT)pvContext; 311 PVBOXVDMACBUF_DR pDr = VBOXVDMACBUF_DR_FROM_DDI_CMD(pDdiCmd); 312 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 313 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr); 314 const UINT cBuffers = 2; 315 315 Assert(pBody->cBuffers == cBuffers); 316 PVBOXMP_CRHGSMICMD_READ pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_READ); 317 CRVBOXHGSMIREAD *pCmd = &pWrData->Cmd; 318 VBOXVDMACMD_CHROMIUM_BUFFER *pBufCmd = &pBody->aBuffers[0]; 316 317 PVBOXMP_CRHGSMICMD_READ pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_READ); 318 CRVBOXHGSMIREAD *pCmd = &pWrData->Cmd; 319 VBOXVDMACMD_CHROMIUM_BUFFER *pBufCmd = &pBody->aBuffers[0]; 319 320 Assert(pBufCmd->cbBuffer == sizeof (CRVBOXHGSMIREAD)); 320 CRVBOXHGSMIREAD * pWr = (CRVBOXHGSMIREAD*)vboxMpCrShgsmiTransportBufFromOffset(pCon, pBufCmd->offBuffer); 321 322 CRVBOXHGSMIREAD *pWr = (CRVBOXHGSMIREAD*)vboxMpCrShgsmiTransportBufFromOffset(pCon, pBufCmd->offBuffer); 321 323 PFNVBOXMP_CRSHGSMITRANSPORT_SENDREADASYNC_COMPLETION pfnCompletion = (PFNVBOXMP_CRSHGSMITRANSPORT_SENDREADASYNC_COMPLETION)pBufCmd->u64GuestData; 322 VBOXVDMACMD_CHROMIUM_BUFFER *pRxBuf = &pBody->aBuffers[1];323 PVBOXMP_CRSHGSMICON_BUFDR pWbDr = (PVBOXMP_CRSHGSMICON_BUFDR)pRxBuf->u64GuestData;324 void RT_UNTRUSTED_VOLATILE_HOST *pvRx = NULL;325 uint32_t cbRx = 0;324 VBOXVDMACMD_CHROMIUM_BUFFER *pRxBuf = &pBody->aBuffers[1]; 325 PVBOXMP_CRSHGSMICON_BUFDR pWbDr = (PVBOXMP_CRSHGSMICON_BUFDR)pRxBuf->u64GuestData; 326 void RT_UNTRUSTED_VOLATILE_HOST *pvRx = NULL; 327 uint32_t cbRx = 0; 326 328 327 329 int rc = pDr->rc; … … 362 364 const uint32_t cBuffers = 2; 363 365 const uint32_t cbCmd = VBOXMP_CRSHGSMICON_DR_SIZE(cBuffers, sizeof (VBOXMP_CRHGSMICMD_READ), cbContextData); 364 PVBOXVDMACMD pHdr= VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);365 VBOXVDMACMD_CHROMIUM_CMD *pBody= VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr);366 PVBOXMP_CRHGSMICMD_READ pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_READ);367 CRVBOXHGSMIREAD *pCmd= &pWrData->Cmd;366 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 367 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr); 368 PVBOXMP_CRHGSMICMD_READ pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_READ); 369 CRVBOXHGSMIREAD *pCmd = &pWrData->Cmd; 368 370 369 371 if (cbCmd > cbContextData) … … 408 410 static int vboxMpCrShgsmiTransportCmdSubmitReadAsync(PVBOXMP_CRSHGSMITRANSPORT pCon, void *pvContext) 409 411 { 410 VBOXVDMACMD * pHdr = VBOXMP_CRSHGSMICON_DR_GET_FROM_CMDCTX(pvContext, 2, sizeof(VBOXMP_CRHGSMICMD_READ));412 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXMP_CRSHGSMICON_DR_GET_FROM_CMDCTX(pvContext, 2, sizeof(VBOXMP_CRHGSMICMD_READ)); 411 413 return vboxMpCrShgsmiTransportCmdSubmitDmaCmd(pCon, pHdr, vboxMpCrShgsmiTransportSendReadAsyncCompletion); 412 414 } … … 437 439 Assert(KeGetCurrentIrql() == DISPATCH_LEVEL); 438 440 439 PVBOXMP_CRSHGSMITRANSPORT pCon = (PVBOXMP_CRSHGSMITRANSPORT)pvContext;440 PVBOXVDMACBUF_DR pDr = VBOXVDMACBUF_DR_FROM_DDI_CMD(pDdiCmd);441 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);442 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr);441 PVBOXMP_CRSHGSMITRANSPORT pCon = (PVBOXMP_CRSHGSMITRANSPORT)pvContext; 442 PVBOXVDMACBUF_DR pDr = VBOXVDMACBUF_DR_FROM_DDI_CMD(pDdiCmd); 443 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 444 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr); 443 445 const UINT cBuffers = 3; 444 446 Assert(pBody->cBuffers == cBuffers); 445 PVBOXMP_CRHGSMICMD_WRITEREAD pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_WRITEREAD); 446 CRVBOXHGSMIWRITEREAD *pCmd = &pWrData->Cmd; 447 VBOXVDMACMD_CHROMIUM_BUFFER *pBufCmd = &pBody->aBuffers[0]; 447 448 PVBOXMP_CRHGSMICMD_WRITEREAD pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_WRITEREAD); 449 CRVBOXHGSMIWRITEREAD *pCmd = &pWrData->Cmd; 450 VBOXVDMACMD_CHROMIUM_BUFFER *pBufCmd = &pBody->aBuffers[0]; 448 451 Assert(pBufCmd->cbBuffer == sizeof (CRVBOXHGSMIWRITEREAD)); 449 CRVBOXHGSMIWRITEREAD * pWr = (CRVBOXHGSMIWRITEREAD*)vboxMpCrShgsmiTransportBufFromOffset(pCon, pBufCmd->offBuffer); 450 VBOXVDMACMD_CHROMIUM_BUFFER *pRxBuf = &pBody->aBuffers[2]; 451 PVBOXMP_CRSHGSMICON_BUFDR pWbDr = (PVBOXMP_CRSHGSMICON_BUFDR)pRxBuf->u64GuestData; 452 453 CRVBOXHGSMIWRITEREAD *pWr = (CRVBOXHGSMIWRITEREAD*)vboxMpCrShgsmiTransportBufFromOffset(pCon, pBufCmd->offBuffer); 454 VBOXVDMACMD_CHROMIUM_BUFFER *pRxBuf = &pBody->aBuffers[2]; 455 PVBOXMP_CRSHGSMICON_BUFDR pWbDr = (PVBOXMP_CRSHGSMICON_BUFDR)pRxBuf->u64GuestData; 452 456 PFNVBOXMP_CRSHGSMITRANSPORT_SENDWRITEREADASYNC_COMPLETION pfnCompletion = (PFNVBOXMP_CRSHGSMITRANSPORT_SENDWRITEREADASYNC_COMPLETION)pBufCmd->u64GuestData; 453 void RT_UNTRUSTED_VOLATILE_HOST *pvRx = NULL;454 uint32_t cbRx = 0;457 void RT_UNTRUSTED_VOLATILE_HOST *pvRx = NULL; 458 uint32_t cbRx = 0; 455 459 456 460 int rc = pDr->rc; … … 522 526 Assert(KeGetCurrentIrql() == DISPATCH_LEVEL); 523 527 524 PVBOXMP_CRSHGSMITRANSPORT pCon = (PVBOXMP_CRSHGSMITRANSPORT)pvContext;525 PVBOXVDMACBUF_DR pDr = VBOXVDMACBUF_DR_FROM_DDI_CMD(pDdiCmd);526 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);527 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr);528 const UINT cBuffers = 2;528 PVBOXMP_CRSHGSMITRANSPORT pCon = (PVBOXMP_CRSHGSMITRANSPORT)pvContext; 529 PVBOXVDMACBUF_DR pDr = VBOXVDMACBUF_DR_FROM_DDI_CMD(pDdiCmd); 530 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 531 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr); 532 const UINT cBuffers = 2; 529 533 Assert(pBody->cBuffers == cBuffers); 530 PVBOXMP_CRHGSMICMD_WRITE pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_WRITE); 531 CRVBOXHGSMIWRITE *pCmd = &pWrData->Cmd; 532 VBOXVDMACMD_CHROMIUM_BUFFER *pBufCmd = &pBody->aBuffers[0]; 534 535 PVBOXMP_CRHGSMICMD_WRITE pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_WRITE); 536 CRVBOXHGSMIWRITE *pCmd = &pWrData->Cmd; 537 VBOXVDMACMD_CHROMIUM_BUFFER *pBufCmd = &pBody->aBuffers[0]; 533 538 Assert(pBufCmd->cbBuffer == sizeof (CRVBOXHGSMIWRITE)); 534 539 PFNVBOXMP_CRSHGSMITRANSPORT_SENDWRITEASYNC_COMPLETION pfnCompletion = (PFNVBOXMP_CRSHGSMITRANSPORT_SENDWRITEASYNC_COMPLETION)pBufCmd->u64GuestData; … … 601 606 } 602 607 603 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);604 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr);605 PVBOXMP_CRHGSMICMD_WRITEREAD pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_WRITEREAD);606 CRVBOXHGSMIWRITEREAD *pCmd = &pWrData->Cmd;608 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 609 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr); 610 PVBOXMP_CRHGSMICMD_WRITEREAD pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_WRITEREAD); 611 CRVBOXHGSMIWRITEREAD *pCmd = &pWrData->Cmd; 607 612 608 613 pDr->fFlags = VBOXVDMACBUF_FLAG_BUF_FOLLOWS_DR; … … 698 703 } 699 704 700 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);701 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr);702 PVBOXMP_CRHGSMICMD_WRITE pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_WRITE);703 CRVBOXHGSMIWRITE *pCmd = &pWrData->Cmd;705 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 706 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXMP_CRSHGSMICON_DR_GET_CRCMD(pHdr); 707 PVBOXMP_CRHGSMICMD_WRITE pWrData = VBOXMP_CRSHGSMICON_DR_GET_CMDBUF(pHdr, cBuffers, VBOXMP_CRHGSMICMD_WRITE); 708 CRVBOXHGSMIWRITE *pCmd = &pWrData->Cmd; 704 709 705 710 pDr->fFlags = VBOXVDMACBUF_FLAG_BUF_FOLLOWS_DR; … … 775 780 void VBoxMpCrShgsmiTransportCmdTermWriteReadAsync(PVBOXMP_CRSHGSMITRANSPORT pCon, void *pvContext) 776 781 { 777 VBOXVDMACMD* pHdr = VBOXMP_CRSHGSMICON_DR_GET_FROM_CMDCTX(pvContext, 3, sizeof (VBOXMP_CRHGSMICMD_WRITEREAD)); 782 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXMP_CRSHGSMICON_DR_GET_FROM_CMDCTX(pvContext, 3, 783 sizeof(VBOXMP_CRHGSMICMD_WRITEREAD)); 778 784 vboxMpCrShgsmiTransportCmdTermDmaCmd(pCon, pHdr); 779 785 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPMisc.cpp
r71590 r71595 1357 1357 1358 1358 PVBOXVDMACBUF_DR pDr = (PVBOXVDMACBUF_DR)pvContext; 1359 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);1359 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 1360 1360 VBOXVDMACMD_CHROMIUM_CMD *pBody = VBOXVDMACMD_BODY(pHdr, VBOXVDMACMD_CHROMIUM_CMD); 1361 1361 UINT cBufs = pBody->cBuffers; … … 1400 1400 pDr->rc = VERR_NOT_IMPLEMENTED; 1401 1401 1402 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);1402 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 1403 1403 pHdr->enmType = VBOXVDMACMD_TYPE_CHROMIUM_CMD; 1404 1404 pHdr->u32CmdSpecific = 0; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPVModes.cpp
r71196 r71595 561 561 PVBOXWDDMCHILDSTATUSCB pCtx = (PVBOXWDDMCHILDSTATUSCB)pvContext; 562 562 PVBOXVDMACBUF_DR pDr = pCtx->pDr; 563 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);563 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 564 564 VBOXVDMACMD_CHILD_STATUS_IRQ *pBody = VBOXVDMACMD_BODY(pHdr, VBOXVDMACMD_CHILD_STATUS_IRQ); 565 565 … … 590 590 pDr->rc = VERR_NOT_IMPLEMENTED; 591 591 592 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);592 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 593 593 pHdr->enmType = VBOXVDMACMD_TYPE_CHILD_STATUS_IRQ; 594 594 pHdr->u32CmdSpecific = 0; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r71590 r71595 3963 3963 SIZE_T cbTransfered = 0; 3964 3964 SIZE_T cbTransferSize = pBuildPagingBuffer->Transfer.TransferSize; 3965 PVBOXVDMACMDpHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD);3965 VBOXVDMACMD RT_UNTRUSTED_VOLATILE_HOST *pHdr = VBOXVDMACBUF_DR_TAIL(pDr, VBOXVDMACMD); 3966 3966 do 3967 3967 {
Note:
See TracChangeset
for help on using the changeset viewer.