unicorn/qemu/util
Peter Maydell b54cfecf1e
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.

Backports commit 57d1f6d7ce23e79a8ebe4a57bd2363b269b4664b from qemu
2018-03-05 14:09:58 -05:00
..
bitmap.c bitmap: provide to_le/from_le helpers 2018-03-05 01:11:13 -05:00
bitops.c bitmap: remove BITOP_WORD() 2018-03-05 01:07:02 -05:00
cacheinfo.c configure: Drop AIX host support 2018-03-04 21:32:40 -05:00
crc32c.c util: Clean up includes 2018-02-19 01:27:55 -05:00
cutils.c util/cutils: Change qemu_strtosz*() from int64_t to uint64_t 2018-03-02 08:58:55 -05:00
error.c include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
getauxval.c util: Clean up includes 2018-02-19 01:27:55 -05:00
host-utils.c util: Clean up includes 2018-02-19 01:27:55 -05:00
log.c util: Move qemu-log to utils 2018-02-25 22:17:44 -05:00
Makefile.objs util: add cacheinfo 2018-03-03 16:58:28 -05:00
mmap-alloc.c util/mmap-alloc: refactor a little bit for readability 2018-03-01 23:55:15 -05:00
module.c util: Clean up includes 2018-02-19 01:27:55 -05:00
oslib-posix.c sparc: Make sure we mmap at SHMLBA alignment 2018-03-05 14:09:58 -05:00
oslib-win32.c util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
qemu-error.c util: Clean up includes 2018-02-19 01:27:55 -05:00
qemu-thread-posix.c util: Clean up includes 2018-02-19 01:27:55 -05:00
qemu-thread-win32.c util: Clean up includes 2018-02-19 01:27:55 -05:00
qemu-timer-common.c util: Clean up includes 2018-02-19 01:27:55 -05:00
range.c range: Replace internal representation of Range 2018-02-25 00:44:36 -05:00