Re: [Qemu-devel] [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

2019-03-15 Thread Igor Druzhinin
On 15/03/2019 18:38, Anthony PERARD wrote: > On Fri, Mar 15, 2019 at 06:14:09PM +, Anthony PERARD wrote: >> On Fri, Mar 15, 2019 at 09:58:47AM +0100, Roger Pau Monne wrote: >>> Or if it's not possible to honor the hinted address an error is returned >>> instead. This makes it easier to spot

Re: [Qemu-devel] [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

2019-03-15 Thread Anthony PERARD
On Fri, Mar 15, 2019 at 06:14:09PM +, Anthony PERARD wrote: > On Fri, Mar 15, 2019 at 09:58:47AM +0100, Roger Pau Monne wrote: > > Or if it's not possible to honor the hinted address an error is returned > > instead. This makes it easier to spot the actual failure, instead of > > failing later

Re: [Qemu-devel] [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

2019-03-15 Thread Anthony PERARD
On Fri, Mar 15, 2019 at 09:54:42AM +, Paul Durrant wrote: > AFAICT xen_remap_bucket() is always called with a NULL vaddr argument > if entry->vaddr_base == NULL, and called with vaddr == > entry->vaddr_base in the other case, so I'd say the vaddr argument is > superfluous. I don't think

Re: [Qemu-devel] [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

2019-03-15 Thread Anthony PERARD
On Fri, Mar 15, 2019 at 09:58:47AM +0100, Roger Pau Monne wrote: > Or if it's not possible to honor the hinted address an error is returned > instead. This makes it easier to spot the actual failure, instead of > failing later on when the caller of xen_remap_bucket realizes the > mapping has not

Re: [Qemu-devel] [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

2019-03-15 Thread Roger Pau Monné
On Fri, Mar 15, 2019 at 10:54:42AM +0100, Paul Durrant wrote: > > -Original Message- > > From: Roger Pau Monne [mailto:roger@citrix.com] > > Sent: 15 March 2019 08:59 > > To: qemu-devel@nongnu.org > > Cc: Roger Pau Monne ; Stefano Stabellini > > ; Anthony > > Perard ; Paul Durrant ;

Re: [Qemu-devel] [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

2019-03-15 Thread Paul Durrant
> -Original Message- > From: Roger Pau Monne > Sent: 15 March 2019 10:10 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; Stefano Stabellini ; > Anthony Perard > ; Igor Druzhinin ; > Paolo Bonzini > ; Richard Henderson ; Eduardo Habkost > ; > Michael S. Tsirkin ; Marcel Apfelbaum > ;

Re: [Qemu-devel] [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

2019-03-15 Thread Paul Durrant
> -Original Message- > From: Roger Pau Monne [mailto:roger@citrix.com] > Sent: 15 March 2019 08:59 > To: qemu-devel@nongnu.org > Cc: Roger Pau Monne ; Stefano Stabellini > ; Anthony > Perard ; Paul Durrant ; > Igor Druzhinin > ; Paolo Bonzini ; Richard > Henderson ; > Eduardo

[Qemu-devel] [PATCH] xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

2019-03-15 Thread Roger Pau Monne
Or if it's not possible to honor the hinted address an error is returned instead. This makes it easier to spot the actual failure, instead of failing later on when the caller of xen_remap_bucket realizes the mapping has not been created at the requested address. Also note that at least on FreeBSD