Lines Matching refs:qsg
13 void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint) in qemu_sglist_init() argument
15 qsg->sg = qemu_malloc(alloc_hint * sizeof(ScatterGatherEntry)); in qemu_sglist_init()
16 qsg->nsg = 0; in qemu_sglist_init()
17 qsg->nalloc = alloc_hint; in qemu_sglist_init()
18 qsg->size = 0; in qemu_sglist_init()
21 void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base, in qemu_sglist_add() argument
24 if (qsg->nsg == qsg->nalloc) { in qemu_sglist_add()
25 qsg->nalloc = 2 * qsg->nalloc + 1; in qemu_sglist_add()
26 qsg->sg = qemu_realloc(qsg->sg, qsg->nalloc * sizeof(ScatterGatherEntry)); in qemu_sglist_add()
28 qsg->sg[qsg->nsg].base = base; in qemu_sglist_add()
29 qsg->sg[qsg->nsg].len = len; in qemu_sglist_add()
30 qsg->size += len; in qemu_sglist_add()
31 ++qsg->nsg; in qemu_sglist_add()
34 void qemu_sglist_destroy(QEMUSGList *qsg) in qemu_sglist_destroy() argument
36 qemu_free(qsg->sg); in qemu_sglist_destroy()