dma: keep a device alive while it has SGLists

Reviewed-by: Anthony Liguori <aliguori@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2013-06-03 14:17:19 +02:00
parent cac3c384bb
commit f487b677c2
7 changed files with 25 additions and 12 deletions

View file

@ -29,6 +29,7 @@ struct QEMUSGList {
int nsg;
int nalloc;
size_t size;
DeviceState *dev;
AddressSpace *as;
};
@ -189,7 +190,8 @@ struct ScatterGatherEntry {
dma_addr_t len;
};
void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint, AddressSpace *as);
void qemu_sglist_init(QEMUSGList *qsg, DeviceState *dev, int alloc_hint,
AddressSpace *as);
void qemu_sglist_add(QEMUSGList *qsg, dma_addr_t base, dma_addr_t len);
void qemu_sglist_destroy(QEMUSGList *qsg);
#endif