qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write
Date: Thu, 11 Aug 2011 08:58:36 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 04, 2011 at 07:14:43PM +0200, Paolo Bonzini wrote:
> These helpers do a full transfer from an in-memory buffer to
> target memory, with full support for MMIO areas.  It will be used to store
> the reply of an emulated command into a QEMUSGList provided by the
> adapter.
> 
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  cutils.c      |    8 +++---
>  dma-helpers.c |   63 
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  dma.h         |    5 ++++
>  3 files changed, 72 insertions(+), 4 deletions(-)

I don't understand this patch.  If we have a memory buffer that needs to
be transferred to target memory, then there is no need for bounce
buffers or cpu_physical_memory_map().

Can we use cpu_physical_memory_rw() on each sglist element instead?  No
-EAGAIN necessary because the memory buffer already acts as the local
bounce buffer.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]