linux-user: Tell guest about big host page sizes
commita70daba3771e96cc6b8fd3d11ed297ab13717018
authorAlexander Graf <agraf@suse.de>
Thu, 5 Jun 2014 09:39:43 +0000 (5 11:39 +0200)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:45 +0000 (16 13:24 +0200)
tree73256d2f361414e1e6e1706365068f8008b752ff
parentd5ac4f543352c3412172fb72256137defb13a4b1
linux-user: Tell guest about big host page sizes

We tell the guest its page size via AUX vectors. The guest process then uses
this page size as information on which boundaries it can mmap() things.

However, if the host has a bigger page size granularity than the guest, it can
not fulfill these mmap() requests - which falls apart when MAP_FIXED is passed
to mmap.

So in that case, let the guest know that we're running on a bigger page size
granularity than the target would require.

This fixes running qemu-ppc (TARGET_PAGE_SIZE=4k) on a 64k page size ppc64 host
for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
linux-user/elfload.c