[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] linux-user: Align mmap_find_vma to host page si
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PATCH 3/3] linux-user: Align mmap_find_vma to host page size |
Date: |
Tue, 16 Oct 2018 18:54:56 -0700 |
This can avoid stack allocation failures for i386 guest
on ppc64 (64k page) host.
Suggested-by: Laurent Vivier <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
linux-user/mmap.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 47950ee9d7..735bc928fe 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -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;
--
2.17.2