Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
bsd-user: Specify host page alignment if none specified
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>
Message-Id: <20230728162927.5009-1-imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
bsdimp authored and rth7680 committed Jul 31, 2023
1 parent 28b61d4 commit 0f2f324
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bsd-user/mmap.c
Expand Up @@ -260,7 +260,8 @@ 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 :
MAX(qemu_host_page_size, TARGET_PAGE_SIZE)));
}

addr = start;
Expand Down

0 comments on commit 0f2f324

Please sign in to comment.