Lines Matching refs:gs
216 ge_slot_t *gs; in gs_get() local
232 gs = kmem_cache_alloc(xdf_gs_cache, KM_NOSLEEP); in gs_get()
233 if (gs == NULL) { in gs_get()
243 gs->gs_oeid = vdp->xdf_peer; in gs_get()
244 gs->gs_isread = isread; in gs_get()
245 gs->gs_ghead = gh; in gs_get()
246 gs->gs_ngrefs = 0; in gs_get()
248 return (gs); in gs_get()
252 gs_free(ge_slot_t *gs) in gs_free() argument
257 for (i = 0; i < gs->gs_ngrefs; i++) in gs_free()
258 gnttab_end_foreign_access(gs->gs_ge[i], !gs->gs_isread, 0); in gs_free()
259 gnttab_free_grant_references(gs->gs_ghead); in gs_free()
260 list_remove(&gs->gs_vreq->v_gs, gs); in gs_free()
261 kmem_cache_free(xdf_gs_cache, gs); in gs_free()
265 gs_grant(ge_slot_t *gs, mfn_t mfn) in gs_grant() argument
267 grant_ref_t gr = gnttab_claim_grant_reference(&gs->gs_ghead); in gs_grant()
270 ASSERT(gs->gs_ngrefs < BLKIF_MAX_SEGMENTS_PER_REQUEST); in gs_grant()
271 gs->gs_ge[gs->gs_ngrefs++] = gr; in gs_grant()
272 gnttab_grant_foreign_access_ref(gr, gs->gs_oeid, mfn, !gs->gs_isread); in gs_grant()
396 ge_slot_t *gs; in vreq_setup() local
407 if ((gs = gs_get(vdp, IS_READ(bp))) == NULL) { in vreq_setup()
416 gs->gs_vreq = vreq; in vreq_setup()
417 list_insert_head(&vreq->v_gs, gs); in vreq_setup()
545 if ((gs = gs_get(vdp, IS_READ(bp))) == NULL) { in vreq_setup()
552 gs->gs_vreq = vreq; in vreq_setup()
553 list_insert_head(&vreq->v_gs, gs); in vreq_setup()
567 if ((gs = gs_get(vdp, IS_READ(bp))) == NULL) { in vreq_setup()
577 gs->gs_vreq = vreq; in vreq_setup()
578 list_insert_head(&vreq->v_gs, gs); in vreq_setup()
905 ge_slot_t *gs = (ge_slot_t *)(uintptr_t)id; in xdf_io_fini() local
906 v_req_t *vreq = gs->gs_vreq; in xdf_io_fini()
912 gs_free(gs); in xdf_io_fini()
1081 ge_slot_t *gs; in xdf_ring_destroy() local
1124 while ((gs = list_head(&vreq->v_gs)) != NULL) in xdf_ring_destroy()
1125 gs_free(gs); in xdf_ring_destroy()
1243 ge_slot_t *gs = list_head(&vreq->v_gs); in xdf_process_rreq() local
1257 (uint64_t)(uintptr_t)(gs)); in xdf_process_rreq()
1278 ddi_put64(acchdl, &rreq->id, (uint64_t)(uintptr_t)(gs)); in xdf_process_rreq()
1300 gr = gs_grant(gs, PATOMA(dma_addr) >> PAGESHIFT); in xdf_process_rreq()