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 <pbonz...@redhat.com> > --- > 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