]> Git Repo - qemu.git/commitdiff
linux-user: Align mmap_find_vma to host page size
authorRichard Henderson <[email protected]>
Sun, 19 May 2019 20:19:53 +0000 (13:19 -0700)
committerLaurent Vivier <[email protected]>
Fri, 24 May 2019 11:16:21 +0000 (13:16 +0200)
This can avoid stack allocation failures for i386 guest
on ppc64 (64k page) host.

Suggested-by: Laurent Vivier <[email protected]>
Signed-off-by: Richard Henderson <[email protected]>
Message-Id: <20190519201953[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
linux-user/mmap.c

index 10796b37ac7bff4cb2077adc0f4b1c4d2e4ea797..af41339d576b2ffe48f2accab8d3d16b4f37c48b 100644 (file)
@@ -262,6 +262,8 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size, abi_ulong align)
     abi_ulong addr;
     int wrapped, repeat;
 
+    align = MAX(align, qemu_host_page_size);
+
     /* If 'start' == 0, then a default start address is used. */
     if (start == 0) {
         start = mmap_next_start;
This page took 0.026557 seconds and 4 git commands to generate.