Re: [Qemu-devel] [PATCH v3 11/34] memory: add memory_region_is_mapped() API

2014-05-30 Thread Igor Mammedov
On Thu, 29 May 2014 17:28:34 +0200 Paolo Bonzini wrote: > Il 29/05/2014 16:22, Peter Crosthwaite ha scritto: > >> > > >> > +bool memory_region_is_mapped(MemoryRegion *mr) > >> > +{ > > Is it not enough to just return mr->parent? Memory mapping assertion > > will happen if you try and map the same

Re: [Qemu-devel] [PATCH v3 11/34] memory: add memory_region_is_mapped() API

2014-05-29 Thread Paolo Bonzini
Il 29/05/2014 16:22, Peter Crosthwaite ha scritto: > > +bool memory_region_is_mapped(MemoryRegion *mr) > +{ Is it not enough to just return mr->parent? Memory mapping assertion will happen if you try and map the same twice, even if one of the mappings is not contained within an AddressSpace. Che

Re: [Qemu-devel] [PATCH v3 11/34] memory: add memory_region_is_mapped() API

2014-05-29 Thread Peter Crosthwaite
On Tue, May 27, 2014 at 11:01 PM, Igor Mammedov wrote: > which allows to check if MemoryRegion is already mapped. > > Signed-off-by: Igor Mammedov > --- > include/exec/memory.h |8 > memory.c | 15 ++- > 2 files changed, 22 insertions(+), 1 deletions(-) >

[Qemu-devel] [PATCH v3 11/34] memory: add memory_region_is_mapped() API

2014-05-27 Thread Igor Mammedov
which allows to check if MemoryRegion is already mapped. Signed-off-by: Igor Mammedov --- include/exec/memory.h |8 memory.c | 15 ++- 2 files changed, 22 insertions(+), 1 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 1d55a