Re: [Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target

2013-04-04 Thread Peter Maydell
On 4 April 2013 15:45, Paolo Bonzini wrote: > Il 04/04/2013 16:37, Peter Maydell ha scritto: >> (I can entirely believe that we get this wrong in a lot of >> places, and that in theory just about anything in a target_ >> struct needs an alignment specifier.) > > Yes, or more simply just use abi_*

Re: [Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target

2013-04-04 Thread Paolo Bonzini
Il 04/04/2013 16:37, Peter Maydell ha scritto: >> Regarding the others, none of them are in target-generic places, and >> > none of them affect m68k (ARM only uses non-standard alignment for llong): >> > >> > - linux-user/mips64/syscall.h is correct with target_ulong, and in >> > general MIPS is be

Re: [Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target

2013-04-04 Thread Peter Maydell
On 4 April 2013 15:26, Paolo Bonzini wrote: > Regarding the others, none of them are in target-generic places, and > none of them affect m68k (ARM only uses non-standard alignment for llong): > > - linux-user/mips64/syscall.h is correct with target_ulong, and in > general MIPS is best left as it i

Re: [Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target

2013-04-04 Thread Paolo Bonzini
Il 04/04/2013 16:18, Peter Maydell ha scritto: >>> Also linux-user/elfload.c:symfind() is casting a pointer to >>> >> target_ulong* and dereferencing it, and that might now cause >>> >> an alignment fault on some host CPUs if the host CPU alignment >>> >> requirements are stricter than the guest's.

Re: [Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target

2013-04-04 Thread Peter Maydell
On 4 April 2013 15:11, Paolo Bonzini wrote: > Il 04/04/2013 16:09, Peter Maydell ha scritto: >> Also linux-user/elfload.c:symfind() is casting a pointer to >> target_ulong* and dereferencing it, and that might now cause >> an alignment fault on some host CPUs if the host CPU alignment >> requireme

Re: [Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target

2013-04-04 Thread Paolo Bonzini
Il 04/04/2013 16:09, Peter Maydell ha scritto: > Agreed in principle, but you seem to have missed some structs > which use target_ulong currently and which presumably should > use abi_ulong instead, eg all the target_ucontext etc structs > in linux-user/signal.c Right. > Also linux-user/elfload.c

Re: [Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target

2013-04-04 Thread Peter Maydell
On 3 April 2013 11:32, Paolo Bonzini wrote: > Previously, this was done for target_long/ulong, and propagated to > abi_long/ulong via a typedef. But target_long/ulong should not > have any specific alignment, it is never used to access guest > memory. Agreed in principle, but you seem to have mi

[Qemu-devel] [PATCH v2 06/10] elfload: only give abi_long/ulong the alignment specified by the target

2013-04-03 Thread Paolo Bonzini
Previously, this was done for target_long/ulong, and propagated to abi_long/ulong via a typedef. But target_long/ulong should not have any specific alignment, it is never used to access guest memory. Signed-off-by: Paolo Bonzini --- configure| 9 - include/exec/cpu-