qemu/bsd-user
Paolo Bonzini 0c2d70c448 translate-all: ensure host page mask is always extended with 1's
Anthony reported that >4GB guests on Xen with 32bit QEMU broke after
commit 4ed023c ("Round up RAMBlock sizes to host page sizes", 2015-11-05).

In that patch sizes are masked against qemu_host_page_size/mask which
are uintptr_t, and thus 32bit on a 32bit QEMU, even though the ram space
might be bigger than 4GB on Xen.

Since ram_addr_t is not available on user-mode emulation targets, ensure
that we get a sign extension when masking away the low bits of the address.
Remove the ~10 year old scary comment that the type of these variables
is probably wrong, with another equally scary comment.  The new comment
however does not have "???" in it, which is arguably an improvement.

For completeness use the alignment macros in linux-user and bsd-user
instead of manually doing an &.  linux-user and bsd-user are not affected
by the Xen issue, however.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Reported-by: Anthony PERARD <anthony.perard@citrix.com>
Fixes: 4ed023ce2a
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-12-02 13:12:30 +01:00
..
freebsd bsd-user: Fix syscall format, add strace support for more syscalls 2014-06-11 00:25:06 +01:00
i386
netbsd
openbsd
sparc
sparc64
x86_64
bsd-mman.h
bsdload.c Revert "bsd-user: replace fprintf(stderr, ...) with error_report()" 2014-06-02 13:26:59 +01:00
elfload.c translate-all: ensure host page mask is always extended with 1's 2015-12-02 13:12:30 +01:00
errno_defs.h
main.c s/cpu_get_real_ticks/cpu_get_host_ticks/ 2015-10-08 19:46:01 +03:00
Makefile.objs
mmap.c bsd-user/mmap.c: Don't try to override g_malloc/g_free 2014-06-11 00:25:06 +01:00
qemu.h exec: make mmap_lock/mmap_unlock globally available 2015-09-09 15:34:56 +02:00
signal.c maint: remove unused include for signal.h 2015-09-11 10:21:38 +03:00
strace.c bsd-user: Implement strace support for print_ioctl syscall 2014-06-11 00:25:06 +01:00
syscall_defs.h
syscall.c
uaccess.c