[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/13] Implement cpu_physical_memory_zero()
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH 02/13] Implement cpu_physical_memory_zero() |
Date: |
Tue, 15 May 2012 11:23:35 +1000 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, May 14, 2012 at 07:42:00PM -0500, Anthony Liguori wrote:
> On 05/09/2012 11:48 PM, Benjamin Herrenschmidt wrote:
> >From: David Gibson<address@hidden>
[snip]
> >@@ -3581,6 +3581,59 @@ void cpu_physical_memory_rw(target_phys_addr_t addr,
> >uint8_t *buf,
> > }
> > }
> >
> >+void cpu_physical_memory_zero(target_phys_addr_t addr, int len)
> >+{
>
> I'd think a memset() like interface would be better but...
I can work with that.
> We should definitely implement this function in terms of
> cpu_physical_memory_write instead of open coding the logic again.
Hrm. Having solved merge conflicts several times by recopying the
cpu_physical_memory_rw() logic, I can certainly see the attraction in
that. However, the point of this function is *not* to have to
allocate a temporary buffer, and I don't really see how to combine the
logic without that.
--
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
- [Qemu-devel] [PATCH 00/13] IOMMU infrastructure, Benjamin Herrenschmidt, 2012/05/10
- [Qemu-devel] [PATCH 04/13] usb-ohci: Use universal DMA helper functions, Benjamin Herrenschmidt, 2012/05/10
- [Qemu-devel] [PATCH 05/13] iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers, Benjamin Herrenschmidt, 2012/05/10
- [Qemu-devel] [PATCH 06/13] ide/ahci: Use universal DMA helper functions, Benjamin Herrenschmidt, 2012/05/10
- [Qemu-devel] [PATCH 07/13] usb: Convert usb_packet_{map, unmap} to universal DMA helpers, Benjamin Herrenschmidt, 2012/05/10
- [Qemu-devel] [PATCH 03/13] iommu: Add universal DMA helper functions, Benjamin Herrenschmidt, 2012/05/10
- [Qemu-devel] [PATCH 09/13] iommu: Add facility to cancel in-use dma memory maps, Benjamin Herrenschmidt, 2012/05/10
- [Qemu-devel] [PATCH 08/13] iommu: Introduce IOMMU emulation infrastructure, Benjamin Herrenschmidt, 2012/05/10