xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored
commit4158e93f4aced247c8db94a0275fc027da7dc97e
authorRoger Pau Monne <roger.pau@citrix.com>
Mon, 18 Mar 2019 17:37:31 +0000 (18 18:37 +0100)
committerAnthony PERARD <anthony.perard@citrix.com>
Tue, 19 Mar 2019 15:32:13 +0000 (19 15:32 +0000)
tree852545e7130f9bbbbc64b1c218653c4d433116a8
parentb98a66201dbc7cf3b962f4bb260f66100cc75578
xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored

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 using MAP_FIXED will cause mmap to
try harder to honor the passed address.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Igor Druzhinin <igor.druzhinin@cirtix.com>
Message-Id: <20190318173731.14494-1-roger.pau@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
hw/i386/xen/xen-mapcache.c