X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=dma.h;h=3d8324bb54aa9c5cfc4d54456a10859c998ef64f;hb=b8095f24f24e50a7d4be33d8a79474aff3324295;hp=d596717f14351133e587359a0c934ebf656330aa;hpb=59a703ebaa9cb5aeda986dc8f627b8d23e3297cd;p=qemu.git diff --git a/dma.h b/dma.h index d596717f1..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,11 +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); - #endif