qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH v3 11/34] memory: add memory_region_is_mapped() API
Date: Fri, 30 May 2014 09:56:55 +0200

On Thu, 29 May 2014 17:28:34 +0200
Paolo Bonzini <address@hidden> 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 twice, even if one of the
> > mappings is not contained within an AddressSpace. Checking for just
> > the parent mr may be a simpler and more accurate check.
> 
> I can see a difference if the memory region is completely overlapped by 
> a higher-priority one.  Igor, what was your idea with this function?
Idea was to let know the caller that it's safe to map this region
so mapping won't assert.
I guess Peter's suggestion just to check parent should work in this case.

> 
> Paolo


-- 
Regards,
  Igor



reply via email to

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