From 8171ee35e2ff3cea6c76280e361cf628b3a8c8df Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 6 Jul 2011 08:02:14 +0200 Subject: dma-helpers: add dma_buf_read and dma_buf_write These helpers do a full transfer from an in-memory buffer to target memory, with support for scatter/gather lists. It will be used to store the reply of an emulated command into a QEMUSGList provided by the adapter. Signed-off-by: Paolo Bonzini --- dma.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'dma.h') diff --git a/dma.h b/dma.h index d50019b75b..346ac4f706 100644 --- a/dma.h +++ b/dma.h @@ -58,4 +58,7 @@ BlockDriverAIOCB *dma_bdrv_read(BlockDriverState *bs, BlockDriverAIOCB *dma_bdrv_write(BlockDriverState *bs, QEMUSGList *sg, uint64_t sector, BlockDriverCompletionFunc *cb, void *opaque); +uint64_t dma_buf_read(uint8_t *ptr, int32_t len, QEMUSGList *sg); +uint64_t dma_buf_write(uint8_t *ptr, int32_t len, QEMUSGList *sg); + #endif -- cgit v1.2.3-55-g7522