diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 21:23:58 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-02-05 21:23:58 +0000 |
commit | 59a703ebaa9cb5aeda986dc8f627b8d23e3297cd (patch) | |
tree | 409d817d5e499297da04543b88823c7fcd6a3c04 /dma.h | |
parent | be959463afd3e257611d6b6ab98d24c0c94d4e3d (diff) |
Introduce block dma helpers (Avi Kivity)
These helpers perform read/write requests on entire scatter/gather lists,
relieving the device emulation code from mapping and unmapping physical
memory, and from looping when map resources are exhausted.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6524 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'dma.h')
-rw-r--r-- | dma.h | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -12,6 +12,7 @@ #include <stdio.h> #include "cpu.h" +#include "block.h" typedef struct { target_phys_addr_t base; @@ -30,4 +31,11 @@ void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base, target_phys_addr_t len); void qemu_sglist_destroy(QEMUSGList *qsg); +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 |