4 * Copyright (c) 2009 Red Hat
6 * This work is licensed under the terms of the GNU General Public License
7 * (GNU GPL), version 2 or later.
19 target_phys_addr_t base
;
20 target_phys_addr_t len
;
24 ScatterGatherEntry
*sg
;
27 target_phys_addr_t size
;
30 void qemu_sglist_init(QEMUSGList
*qsg
, int alloc_hint
);
31 void qemu_sglist_add(QEMUSGList
*qsg
, target_phys_addr_t base
,
32 target_phys_addr_t len
);
33 void qemu_sglist_destroy(QEMUSGList
*qsg
);
35 typedef BlockDriverAIOCB
*DMAIOFunc(BlockDriverState
*bs
, int64_t sector_num
,
36 QEMUIOVector
*iov
, int nb_sectors
,
37 BlockDriverCompletionFunc
*cb
, void *opaque
);
39 BlockDriverAIOCB
*dma_bdrv_io(BlockDriverState
*bs
,
40 QEMUSGList
*sg
, uint64_t sector_num
,
41 DMAIOFunc
*io_func
, BlockDriverCompletionFunc
*cb
,
42 void *opaque
, int is_write
);
43 BlockDriverAIOCB
*dma_bdrv_read(BlockDriverState
*bs
,
44 QEMUSGList
*sg
, uint64_t sector
,
45 BlockDriverCompletionFunc
*cb
, void *opaque
);
46 BlockDriverAIOCB
*dma_bdrv_write(BlockDriverState
*bs
,
47 QEMUSGList
*sg
, uint64_t sector
,
48 BlockDriverCompletionFunc
*cb
, void *opaque
);