Lines Matching refs:gs

229 	ge_slot_t *gs;  in gs_get()  local
245 gs = kmem_cache_alloc(xdf_gs_cache, KM_NOSLEEP); in gs_get()
246 if (gs == NULL) { in gs_get()
256 gs->gs_oeid = vdp->xdf_peer; in gs_get()
257 gs->gs_isread = isread; in gs_get()
258 gs->gs_ghead = gh; in gs_get()
259 gs->gs_ngrefs = 0; in gs_get()
261 return (gs); in gs_get()
265 gs_free(ge_slot_t *gs) in gs_free() argument
270 for (i = 0; i < gs->gs_ngrefs; i++) in gs_free()
271 gnttab_end_foreign_access(gs->gs_ge[i], !gs->gs_isread, 0); in gs_free()
272 gnttab_free_grant_references(gs->gs_ghead); in gs_free()
273 list_remove(&gs->gs_vreq->v_gs, gs); in gs_free()
274 kmem_cache_free(xdf_gs_cache, gs); in gs_free()
278 gs_grant(ge_slot_t *gs, mfn_t mfn) in gs_grant() argument
280 grant_ref_t gr = gnttab_claim_grant_reference(&gs->gs_ghead); in gs_grant()
283 ASSERT(gs->gs_ngrefs < BLKIF_MAX_SEGMENTS_PER_REQUEST); in gs_grant()
284 gs->gs_ge[gs->gs_ngrefs++] = gr; in gs_grant()
285 gnttab_grant_foreign_access_ref(gr, gs->gs_oeid, mfn, !gs->gs_isread); in gs_grant()
409 ge_slot_t *gs; in vreq_setup() local
420 if ((gs = gs_get(vdp, IS_READ(bp))) == NULL) { in vreq_setup()
429 gs->gs_vreq = vreq; in vreq_setup()
430 list_insert_head(&vreq->v_gs, gs); in vreq_setup()
558 if ((gs = gs_get(vdp, IS_READ(bp))) == NULL) { in vreq_setup()
565 gs->gs_vreq = vreq; in vreq_setup()
566 list_insert_head(&vreq->v_gs, gs); in vreq_setup()
580 if ((gs = gs_get(vdp, IS_READ(bp))) == NULL) { in vreq_setup()
590 gs->gs_vreq = vreq; in vreq_setup()
591 list_insert_head(&vreq->v_gs, gs); in vreq_setup()
919 ge_slot_t *gs = (ge_slot_t *)(uintptr_t)id; in xdf_io_fini() local
920 v_req_t *vreq = gs->gs_vreq; in xdf_io_fini()
926 gs_free(gs); in xdf_io_fini()
1095 ge_slot_t *gs; in xdf_ring_destroy() local
1138 while ((gs = list_head(&vreq->v_gs)) != NULL) in xdf_ring_destroy()
1139 gs_free(gs); in xdf_ring_destroy()
1257 ge_slot_t *gs = list_head(&vreq->v_gs); in xdf_process_rreq() local
1271 (uint64_t)(uintptr_t)(gs)); in xdf_process_rreq()
1292 ddi_put64(acchdl, &rreq->id, (uint64_t)(uintptr_t)(gs)); in xdf_process_rreq()
1314 gr = gs_grant(gs, PATOMA(dma_addr) >> PAGESHIFT); in xdf_process_rreq()