qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/13] Implement cpu_physical_memory_set()


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH 02/13] Implement cpu_physical_memory_set()
Date: Thu, 21 Jun 2012 11:46:44 +1000
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Jun 21, 2012 at 11:45:14AM +1000, David Gibson wrote:
> On Wed, Jun 20, 2012 at 04:15:13PM -0500, Anthony Liguori wrote:
> > On 06/19/2012 01:39 AM, Benjamin Herrenschmidt wrote:
> > >From: David Gibson<address@hidden>
> > >
> > >This patch adds cpu_physical_memory_set() function.  This is equivalent to
> > >calling cpu_physical_memory_write() with a buffer filled with a character,
> > >ie, a memset of target memory.
> > >
> > >It uses a small temporary buffer on the stack.
> > >
> > >Signed-off-by: David Gibson<address@hidden>
> > >Signed-off-by: Benjamin Herrenschmidt<address@hidden>
> > 
> > Why should this be in the core API?  Shouldn't this be a helper on
> > top of the DMA API?
> 
> Well, I was hoping to avoid having to allocate a temporary buffer of
> zeroes, which is necessary to do this in terms of the existing
> cpu_physical_memory_write() api.

Ugh, sorry, I'm out of date again.  That's what I did do; now it does
have a temp buf because you already asked ben to get rid of the
duplicated memory write logic, so I guess it could be at the dma layer
instead.  I'm pretty sure at least one person suggested it be at this
layer though.

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson



reply via email to

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