X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=dma.h;h=3d8324bb54aa9c5cfc4d54456a10859c998ef64f;hb=5a82362ad0bf06bba3377d63ca0ecd05fb74f322;hp=7d2ab45b02b01d4d83182bd1ddb8feb0aef4e7f0;hpb=6512a2a7106480c19183d6466a6845bc9bdf6ec0;p=qemu.git diff --git a/dma.h b/dma.h index 7d2ab45b0..3d8324bb5 100644 --- a/dma.h +++ b/dma.h @@ -11,7 +11,8 @@ #define DMA_H #include -#include "cpu.h" +//#include "cpu.h" +#include "hw/hw.h" #include "block.h" typedef struct { @@ -31,12 +32,18 @@ void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base, target_phys_addr_t len); void qemu_sglist_destroy(QEMUSGList *qsg); +typedef BlockDriverAIOCB *DMAIOFunc(BlockDriverState *bs, int64_t sector_num, + QEMUIOVector *iov, int nb_sectors, + BlockDriverCompletionFunc *cb, void *opaque); + +BlockDriverAIOCB *dma_bdrv_io(BlockDriverState *bs, + QEMUSGList *sg, uint64_t sector_num, + DMAIOFunc *io_func, BlockDriverCompletionFunc *cb, + void *opaque, int is_write); BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs, QEMUSGList *sg, uint64_t sector, BlockDriverCompletionFunc *cb, void *opaque); BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs, QEMUSGList *sg, uint64_t sector, BlockDriverCompletionFunc *cb, void *opaque); -void dma_helper_init(void); - #endif