mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
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:
parent
cac3c384bb
commit
f487b677c2
7 changed files with 25 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue