[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 57d1f6: sparc: Make sure we mmap at SHMLBA al

From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 57d1f6: sparc: Make sure we mmap at SHMLBA alignment
Date: Fri, 15 Dec 2017 08:43:53 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 57d1f6d7ce23e79a8ebe4a57bd2363b269b4664b
  Author: Peter Maydell <address@hidden>
  Date:   2017-12-15 (Fri, 15 Dec 2017)

  Changed paths:
    M include/qemu/osdep.h
    M util/mmap-alloc.c

  Log Message:
  sparc: Make sure we mmap at SHMLBA alignment

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 <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Message-id: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]