From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
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 [thread overview]
Message-ID: <20181017015456.3293-4-richard.henderson@linaro.org> (raw)
In-Reply-To: <20181017015456.3293-1-richard.henderson@linaro.org>
This can avoid stack allocation failures for i386 guest
on ppc64 (64k page) host.
Suggested-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
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
prev parent reply other threads:[~2018-10-17 1:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-17 1:54 [Qemu-devel] [PATCH 0/3] linux-user: Fix shmat by honoring SHMLBA Richard Henderson
2018-10-17 1:54 ` [Qemu-devel] [PATCH 1/3] tests/tcg/multiarch/linux-test: Fix error check for shmat Richard Henderson
2018-10-17 1:54 ` [Qemu-devel] [PATCH 2/3] linux-user: Fix shmat emulation by honoring host SHMLBA Richard Henderson
2018-10-17 1:54 ` Richard Henderson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181017015456.3293-4-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).