On 15.01.22 21:37, Laurent Vivier wrote: > From: Philippe Mathieu-Daudé <phi...@redhat.com> > > dma_memory_set() does a DMA barrier, set the address space with > a constant value. The constant value filling code is not specific > to DMA and can be used for AddressSpace. Extract it as a new > helper: address_space_set(). > > Signed-off-by: Philippe Mathieu-Daudé <phi...@redhat.com> > Reviewed-by: Laurent Vivier <laur...@vivier.eu> > Reviewed-by: Stefano Garzarella <sgarz...@redhat.com> > Reviewed-by: Richard Henderson <richard.hender...@linaro.org> > [lv: rebase] > Signed-off-by: Laurent Vivier <laur...@vivier.eu> > --- > include/exec/memory.h | 16 ++++++++++++++++ > softmmu/dma-helpers.c | 15 +-------------- > softmmu/physmem.c | 19 +++++++++++++++++++ > 3 files changed, 36 insertions(+), 14 deletions(-) > > diff --git a/include/exec/memory.h b/include/exec/memory.h > index 20f1b27377ea..c00c50943107 100644 > --- a/include/exec/memory.h > +++ b/include/exec/memory.h > @@ -2906,6 +2906,22 @@ address_space_write_cached(MemoryRegionCache *cache, > hwaddr addr, > } > } > > +/** > + * address_space_set: Fill address space with a constant byte.
nit: Fill selected part of an address space with a constant byte. :) Reviewed-by: David Hildenbrand <da...@redhat.com> -- Thanks, David / dhildenb