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: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 02/13] Implement cpu_physical_memory_set()
Date: Wed, 20 Jun 2012 16:37:24 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 06/20/2012 04:30 PM, Benjamin Herrenschmidt wrote:
On Wed, 2012-06-20 at 16:15 -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?

This comes from the original patch which hand implemented the "set" by
reproducing the logic inside cpu_physical_memory_rw(). I turned into a
wrapper on top of the latter based on (your ?) previous reviews on this
list. I don't care enough to argue to keep it if you want it gone, we do
have a "clear" accessors in the PAPR vio dma accessors which is handy
but I could implement it locally.

I think it's better to just stick this with the other DMA helpers and not have a cpu_physical version. People shouldn't use that API directly so not having it there encourages people to look elsewhere.

Regards,

Anthony Liguori


Cheers,
Ben.






reply via email to

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