From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShWf7-0003a6-Oh for qemu-devel@nongnu.org; Wed, 20 Jun 2012 21:58:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ShWf4-0002J3-IQ for qemu-devel@nongnu.org; Wed, 20 Jun 2012 21:58:21 -0400 Received: from ozlabs.org ([203.10.76.45]:59264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ShWf4-0002Ig-6d for qemu-devel@nongnu.org; Wed, 20 Jun 2012 21:58:18 -0400 Date: Thu, 21 Jun 2012 11:46:44 +1000 From: David Gibson Message-ID: <20120621014644.GD12749@truffala.fritz.box> References: <1340087992-2399-1-git-send-email-benh@kernel.crashing.org> <1340087992-2399-3-git-send-email-benh@kernel.crashing.org> <4FE23D61.3030000@codemonkey.ws> <20120621014514.GC12749@truffala.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120621014514.GC12749@truffala.fritz.box> Subject: Re: [Qemu-devel] [PATCH 02/13] Implement cpu_physical_memory_set() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Benjamin Herrenschmidt , qemu-devel@nongnu.org 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 > > > > > >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 > > >Signed-off-by: Benjamin Herrenschmidt > > > > 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