From: Richard Henderson <richard.henderson@linaro.org>
To: Warner Losh <imp@bsdimp.com>, qemu-devel@nongnu.org
Cc: Kyle Evans <kevans@freebsd.org>
Subject: Re: [PATCH] bsd-user: Specify host page alignment if none specified
Date: Fri, 28 Jul 2023 06:41:16 -0700 [thread overview]
Message-ID: <3f2d28ff-8746-b7fb-d2ee-0d8e08403281@linaro.org> (raw)
In-Reply-To: <10ae7649-7712-9884-0604-645cb12068aa@linaro.org>
On 7/28/23 06:34, Richard Henderson wrote:
> On 7/27/23 20:54, Warner Losh wrote:
>> 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(-)
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>
>
> r~
>
>>
>> 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));
Actually, it probably should be MAX(qemu_host_page_size, TARGET_PAGE_SIZE).
Does freebsd currently support any hosts with a page size that is not 4k? It would have
been true in the past, certainly, but perhaps they've all been deprecated and removed.
r~
next prev parent reply other threads:[~2023-07-28 13:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 3:54 [PATCH] bsd-user: Specify host page alignment if none specified Warner Losh
2023-07-28 13:34 ` Richard Henderson
2023-07-28 13:41 ` Richard Henderson [this message]
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=3f2d28ff-8746-b7fb-d2ee-0d8e08403281@linaro.org \
--to=richard.henderson@linaro.org \
--cc=imp@bsdimp.com \
--cc=kevans@freebsd.org \
--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).