From: Warner Losh <imp@bsdimp.com>
To: qemu-devel@nongnu.org
Cc: Kyle Evans <kevans@freebsd.org>,
richard.henderson@linaro.org, Warner Losh <imp@bsdimp.com>
Subject: [PATCH] bsd-user: Specify host page alignment if none specified
Date: Thu, 27 Jul 2023 21:54:56 -0600 [thread overview]
Message-ID: <20230728035456.99066-1-imp@bsdimp.com> (raw)
We're hitting an assert when we pass in alignment == 0 since that's not
a power of two. so pass in the ideal page size.
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index 74ed00b9fe3..e3ce4ab1fc7 100644
--- a/bsd-user/mmap.c
+++ b/bsd-user/mmap.c
@@ -260,7 +260,7 @@ static abi_ulong mmap_find_vma_aligned(abi_ulong start, abi_ulong size,
if (reserved_va) {
return mmap_find_vma_reserved(start, size,
- (alignment != 0 ? 1 << alignment : 0));
+ (alignment != 0 ? 1 << alignment : qemu_host_page_size));
}
addr = start;
--
2.40.0
next reply other threads:[~2023-07-28 4:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 3:54 Warner Losh [this message]
2023-07-28 13:34 ` [PATCH] bsd-user: Specify host page alignment if none specified Richard Henderson
2023-07-28 13:41 ` Richard Henderson
2023-07-28 16:20 ` Warner Losh
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=20230728035456.99066-1-imp@bsdimp.com \
--to=imp@bsdimp.com \
--cc=kevans@freebsd.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).