From: Richard Henderson <richard.henderson@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] sparc: Make sure we mmap at SHMLBA alignment
Date: Mon, 11 Dec 2017 21:53:13 -0800 [thread overview]
Message-ID: <089717fa-9e7e-fe79-3315-ccc13c01de8d@linaro.org> (raw)
In-Reply-To: <1512752248-17857-1-git-send-email-peter.maydell@linaro.org>
On 12/08/2017 08:57 AM, Peter Maydell wrote:
> SPARC Linux has an oddity that it insists that mmap()
> of MAP_FIXED memory must be at an alignment defined by
> SHMLBA, which is more aligned than the page size
> (typically, SHMLBA alignment is to 16K, and pages are 8K).
> This is a relic of ancient hardware that had cache
> aliasing constraints, but even on modern hardware the
> kernel still insists on the alignment.
>
> To ensure that we get mmap() alignment sufficient to
> make the kernel happy, change QEMU_VMALLOC_ALIGN,
> qemu_fd_getpagesize() and qemu_mempath_getpagesize()
> to use the maximum of getpagesize() and SHMLBA.
>
> In particular, this allows 'make check' to pass on Sparc:
> we were previously failing the ivshmem tests.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
next prev parent reply other threads:[~2017-12-12 5:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-08 16:57 [Qemu-devel] [PATCH] sparc: Make sure we mmap at SHMLBA alignment Peter Maydell
2017-12-12 5:53 ` Richard Henderson [this message]
2017-12-15 16:44 ` Peter Maydell
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=089717fa-9e7e-fe79-3315-ccc13c01de8d@linaro.org \
--to=richard.henderson@linaro.org \
--cc=glaubitz@physik.fu-berlin.de \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.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).