Lines Matching defs:pGuestParm
672 HGCMFunctionParameter64 *pGuestParm = VMMDEV_HGCM_CALL_PARMS64(pHGCMCall);
674 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
679 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++)
681 switch (pGuestParm->type)
687 if (pGuestParm->u.Pointer.size > 0)
690 if (pGuestParm->u.Pointer.size > VMMDEV_MAX_HGCM_DATA_SIZE - cbCmdSize)
696 cbCmdSize += pGuestParm->u.Pointer.size;
700 cLinPtrPages += ((pGuestParm->u.Pointer.u.linearAddr & PAGE_OFFSET_MASK)
701 + pGuestParm->u.Pointer.size + PAGE_SIZE - 1) / PAGE_SIZE;
704 Log(("vmmdevHGCMCall: linptr size = %d\n", pGuestParm->u.Pointer.size));
709 if (pGuestParm->u.PageList.size > VMMDEV_MAX_HGCM_DATA_SIZE - cbCmdSize)
715 cbCmdSize += pGuestParm->u.PageList.size;
716 Log(("vmmdevHGCMCall: pagelist size = %d\n", pGuestParm->u.PageList.size));
727 AssertMsgFailed(("vmmdevHGCMCall: invalid parameter type %x\n", pGuestParm->type));
737 HGCMFunctionParameter32 *pGuestParm = VMMDEV_HGCM_CALL_PARMS32(pHGCMCall);
739 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
743 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++)
745 switch (pGuestParm->type)
751 if (pGuestParm->u.Pointer.size > 0)
754 if (pGuestParm->u.Pointer.size > VMMDEV_MAX_HGCM_DATA_SIZE - cbCmdSize)
760 cbCmdSize += pGuestParm->u.Pointer.size;
764 cLinPtrPages += ((pGuestParm->u.Pointer.u.linearAddr & PAGE_OFFSET_MASK)
765 + pGuestParm->u.Pointer.size + PAGE_SIZE - 1) / PAGE_SIZE;
768 Log(("vmmdevHGCMCall: linptr size = %d\n", pGuestParm->u.Pointer.size));
773 if (pGuestParm->u.PageList.size > VMMDEV_MAX_HGCM_DATA_SIZE - cbCmdSize)
779 cbCmdSize += pGuestParm->u.PageList.size;
780 Log(("vmmdevHGCMCall: pagelist size = %d\n", pGuestParm->u.PageList.size));
790 AssertMsgFailed(("vmmdevHGCMCall: invalid parameter type %x\n", pGuestParm->type));
853 HGCMFunctionParameter64 *pGuestParm = VMMDEV_HGCM_CALL_PARMS64(pHGCMCall);
855 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
860 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++, pHostParm++)
862 switch (pGuestParm->type)
866 uint32_t u32 = pGuestParm->u.value32;
877 uint64_t u64 = pGuestParm->u.value64;
890 uint32_t size = pGuestParm->u.Pointer.size;
891 RTGCPTR linearAddr = pGuestParm->u.Pointer.u.linearAddr;
907 if (pGuestParm->type != VMMDevHGCMParmType_LinAddr_Out)
932 uint32_t size = pGuestParm->u.PageList.size;
936 || pGuestParm->u.PageList.offset > cbHGCMCall - sizeof (HGCMPageListInfo))
943 HGCMPageListInfo *pPageListInfo = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + pGuestParm->u.PageList.offset);
948 || cbHGCMCall < pGuestParm->u.PageList.offset + cbPageListInfo)
996 HGCMFunctionParameter32 *pGuestParm = VMMDEV_HGCM_CALL_PARMS32(pHGCMCall);
998 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
1001 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++, pHostParm++)
1003 switch (pGuestParm->type)
1007 uint32_t u32 = pGuestParm->u.value32;
1018 uint64_t u64 = pGuestParm->u.value64;
1031 uint32_t size = pGuestParm->u.Pointer.size;
1032 RTGCPTR linearAddr = pGuestParm->u.Pointer.u.linearAddr;
1048 if (pGuestParm->type != VMMDevHGCMParmType_LinAddr_Out)
1073 uint32_t size = pGuestParm->u.PageList.size;
1077 || pGuestParm->u.PageList.offset > cbHGCMCall - sizeof (HGCMPageListInfo))
1084 HGCMPageListInfo *pPageListInfo = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + pGuestParm->u.PageList.offset);
1089 || cbHGCMCall < pGuestParm->u.PageList.offset + cbPageListInfo)
1216 HGCMFunctionParameter64 *pGuestParm = VMMDEV_HGCM_CALL_PARMS64(pHGCMCall);
1218 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
1223 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++)
1225 switch (pGuestParm->type)
1231 if (pGuestParm->u.Pointer.size > 0)
1234 cbCmdSize += pGuestParm->u.Pointer.size;
1238 cLinPtrPages += ((pGuestParm->u.Pointer.u.linearAddr & PAGE_OFFSET_MASK)
1239 + pGuestParm->u.Pointer.size + PAGE_SIZE - 1) / PAGE_SIZE;
1242 Log(("vmmdevHGCMCall: linptr size = %d\n", pGuestParm->u.Pointer.size));
1247 cbCmdSize += pGuestParm->u.PageList.size;
1248 Log(("vmmdevHGCMCall: pagelist size = %d\n", pGuestParm->u.PageList.size));
1259 AssertMsgFailed(("vmmdevHGCMCall: invalid parameter type %x\n", pGuestParm->type));
1269 HGCMFunctionParameter32 *pGuestParm = VMMDEV_HGCM_CALL_PARMS32(pHGCMCall);
1271 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
1275 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++)
1277 switch (pGuestParm->type)
1283 if (pGuestParm->u.Pointer.size > 0)
1286 cbCmdSize += pGuestParm->u.Pointer.size;
1290 cLinPtrPages += ((pGuestParm->u.Pointer.u.linearAddr & PAGE_OFFSET_MASK)
1291 + pGuestParm->u.Pointer.size + PAGE_SIZE - 1) / PAGE_SIZE;
1294 Log(("vmmdevHGCMCall: linptr size = %d\n", pGuestParm->u.Pointer.size));
1299 cbCmdSize += pGuestParm->u.PageList.size;
1300 Log(("vmmdevHGCMCall: pagelist size = %d\n", pGuestParm->u.PageList.size));
1310 AssertMsgFailed(("vmmdevHGCMCall: invalid parameter type %x\n", pGuestParm->type));
1365 HGCMFunctionParameter64 *pGuestParm = VMMDEV_HGCM_CALL_PARMS64(pHGCMCall);
1367 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
1371 for (iParm = 0; iParm < cParms && RT_SUCCESS(rc); iParm++, pGuestParm++, pHostParm++)
1373 switch (pGuestParm->type)
1377 uint32_t u32 = pGuestParm->u.value32;
1388 uint64_t u64 = pGuestParm->u.value64;
1401 uint32_t size = pGuestParm->u.Pointer.size;
1420 if (pGuestParm->type != VMMDevHGCMParmType_LinAddr_Out)
1476 pGuestParm->u.Pointer.u.linearAddr, rc));
1482 uint32_t size = pGuestParm->u.PageList.size;
1486 || pGuestParm->u.PageList.offset > cbHGCMCall - sizeof (HGCMPageListInfo))
1493 HGCMPageListInfo *pPageListInfo = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + pGuestParm->u.PageList.offset);
1498 || cbHGCMCall < pGuestParm->u.PageList.offset + cbPageListInfo)
1546 HGCMFunctionParameter32 *pGuestParm = VMMDEV_HGCM_CALL_PARMS32(pHGCMCall);
1548 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
1551 for (iParm = 0; iParm < cParms && RT_SUCCESS(rc); iParm++, pGuestParm++, pHostParm++)
1553 switch (pGuestParm->type)
1557 uint32_t u32 = pGuestParm->u.value32;
1568 uint64_t u64 = pGuestParm->u.value64;
1581 uint32_t size = pGuestParm->u.Pointer.size;
1600 if (pGuestParm->type != VMMDevHGCMParmType_LinAddr_Out)
1656 pGuestParm->u.Pointer.u.linearAddr, rc));
1662 uint32_t size = pGuestParm->u.PageList.size;
1666 || pGuestParm->u.PageList.offset > cbHGCMCall - sizeof (HGCMPageListInfo))
1673 HGCMPageListInfo *pPageListInfo = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + pGuestParm->u.PageList.offset);
1678 || cbHGCMCall < pGuestParm->u.PageList.offset + cbPageListInfo)
1830 static int vmmdevHGCMParmVerify64(HGCMFunctionParameter64 *pGuestParm, VBOXHGCMSVCPARM *pHostParm)
1834 switch (pGuestParm->type)
1850 && pGuestParm->u.Pointer.size >= pHostParm->u.pointer.size)
1856 && pGuestParm->u.PageList.size >= pHostParm->u.pointer.size)
1861 AssertLogRelMsgFailed(("hgcmCompleted: invalid parameter type %08X\n", pGuestParm->type));
1870 static int vmmdevHGCMParmVerify32(HGCMFunctionParameter32 *pGuestParm, VBOXHGCMSVCPARM *pHostParm)
1872 static int vmmdevHGCMParmVerify32(HGCMFunctionParameter *pGuestParm, VBOXHGCMSVCPARM *pHostParm)
1877 switch (pGuestParm->type)
1893 && pGuestParm->u.Pointer.size >= pHostParm->u.pointer.size)
1899 && pGuestParm->u.PageList.size >= pHostParm->u.pointer.size)
1904 AssertLogRelMsgFailed(("hgcmCompleted: invalid parameter type %08X\n", pGuestParm->type));
2016 HGCMFunctionParameter64 *pGuestParm = VMMDEV_HGCM_CALL_PARMS64(pHGCMCall);
2018 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++, pHostParm++)
2020 rc = vmmdevHGCMParmVerify64(pGuestParm, pHostParm);
2024 switch (pGuestParm->type)
2028 pGuestParm->u.value32 = pHostParm->u.uint32;
2033 pGuestParm->u.value64 = pHostParm->u.uint64;
2041 uint32_t size = pGuestParm->u.Pointer.size;
2045 if (pGuestParm->type != VMMDevHGCMParmType_LinAddr_In)
2061 uint32_t size = pGuestParm->u.PageList.size;
2065 || pGuestParm->u.PageList.offset > cbHGCMCall - sizeof (HGCMPageListInfo))
2072 HGCMPageListInfo *pPageListInfo = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + pGuestParm->u.PageList.offset);
2077 || cbHGCMCall < pGuestParm->u.PageList.offset + cbPageListInfo)
2125 HGCMFunctionParameter32 *pGuestParm = VMMDEV_HGCM_CALL_PARMS32(pHGCMCall);
2127 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++, pHostParm++)
2129 rc = vmmdevHGCMParmVerify32(pGuestParm, pHostParm);
2133 switch (pGuestParm->type)
2137 pGuestParm->u.value32 = pHostParm->u.uint32;
2142 pGuestParm->u.value64 = pHostParm->u.uint64;
2150 uint32_t size = pGuestParm->u.Pointer.size;
2154 if (pGuestParm->type != VMMDevHGCMParmType_LinAddr_In)
2169 uint32_t size = pGuestParm->u.PageList.size;
2173 || pGuestParm->u.PageList.offset > cbHGCMCall - sizeof (HGCMPageListInfo))
2180 HGCMPageListInfo *pPageListInfo = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + pGuestParm->u.PageList.offset);
2185 || cbHGCMCall < pGuestParm->u.PageList.offset + cbPageListInfo)
2233 HGCMFunctionParameter *pGuestParm = VMMDEV_HGCM_CALL_PARMS(pHGCMCall);
2235 for (i = 0; i < cParms && RT_SUCCESS(rc); i++, pGuestParm++, pHostParm++)
2237 rc = vmmdevHGCMParmVerify32(pGuestParm, pHostParm);
2241 switch (pGuestParm->type)
2245 pGuestParm->u.value32 = pHostParm->u.uint32;
2250 pGuestParm->u.value64 = pHostParm->u.uint64;
2258 uint32_t size = pGuestParm->u.Pointer.size;
2262 if (pGuestParm->type != VMMDevHGCMParmType_LinAddr_In)
2277 uint32_t size = pGuestParm->u.PageList.size;
2281 || pGuestParm->u.PageList.offset > cbHGCMCall - sizeof (HGCMPageListInfo))
2288 HGCMPageListInfo *pPageListInfo = (HGCMPageListInfo *)((uint8_t *)pHGCMCall + pGuestParm->u.PageList.offset);
2293 || cbHGCMCall < pGuestParm->u.PageList.offset + cbPageListInfo)