qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Xen-devel] [PATCH v3] xen-mapcache: use MAP_FIXED flag


From: Anthony PERARD
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH v3] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored
Date: Tue, 19 Mar 2019 14:16:44 +0000
User-agent: Mutt/1.11.3 (2019-02-01)

On Mon, Mar 18, 2019 at 10:43:12PM +0100, Marek Marczykowski-Górecki wrote:
> On Mon, Mar 18, 2019 at 06:37:31PM +0100, Roger Pau Monne wrote:
> > Or if it's not possible to honor the hinted address an error is returned
> > instead. 
> 
> Just to be sure: MAP_FIXED will cause to map at specified address, even
> if something is mapped there already. From mmap(2):

That should be fine. We do want to replace an exiting mapping (which is
munmap before the mmap call), but it would have been nice to know when
something is already mapped, to detect programming error.

>     If the memory region specified by addr and len overlaps pages of any
>     existing mapping(s), then the overlapped part of the existing map‐
>     ping(s) will be discarded.  If the specified address cannot be used,
>     mmap() will fail.

-- 
Anthony PERARD



reply via email to

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