Lines Matching refs:pElem
66 // void vqueueElemFree(PVQUEUEELEM pElem)
127 bool vqueueGet(PVPCISTATE pState, PVQUEUE pQueue, PVQUEUEELEM pElem, bool fRemove)
132 pElem->nIn = pElem->nOut = 0;
141 pElem->uIndex = idx;
150 QUEUENAME(pState, pQueue), pElem->nIn, idx, desc.u64Addr, desc.uLen));
151 pSeg = &pElem->aSegsIn[pElem->nIn++];
156 QUEUENAME(pState, pQueue), pElem->nOut, idx, desc.u64Addr, desc.uLen));
157 pSeg = &pElem->aSegsOut[pElem->nOut++];
168 QUEUENAME(pState, pQueue), pElem->uIndex, pElem->nIn, pElem->nOut));
199 void vqueuePut(PVPCISTATE pState, PVQUEUE pQueue, PVQUEUEELEM pElem, uint32_t uLen, uint32_t uReserved)
204 QUEUENAME(pState, pQueue), pElem->uIndex, uLen));
205 for (i = uOffset = 0; i < pElem->nIn && uOffset < uLen - uReserved; i++)
207 uint32_t cbSegLen = RT_MIN(uLen - cbReserved - uOffset, pElem->aSegsIn[i].cb - cbReserved);
208 if (pElem->aSegsIn[i].pv)
211 QUEUENAME(pState, pQueue), pQueue->uNextUsedIndex, i, pElem->aSegsIn[i].addr, pElem->aSegsIn[i].pv, pElem->aSegsIn[i].cb, cbSegLen));
212 PDMDevHlpPCIPhysWrite(pState->CTX_SUFF(pDevIns), pElem->aSegsIn[i].addr + cbReserved,
213 pElem->aSegsIn[i].pv, cbSegLen);
219 Assert((uReserved + uOffset) == uLen || pElem->nIn == 0);
221 QUEUENAME(pState, pQueue), pQueue->uNextUsedIndex, vringReadUsedIndex(pState, &pQueue->VRing), pElem->uIndex, uLen));
222 vringWriteUsedElem(pState, &pQueue->VRing, pQueue->uNextUsedIndex++, pElem->uIndex, uLen);