Re: [Qemu-devel] [PATCH] migration: Don't use *_to_cpup()

2016-06-10 Thread Peter Maydell
On 10 June 2016 at 16:05, Eric Blake wrote: > On 06/10/2016 09:01 AM, Peter Maydell wrote: >> The *_to_cpup() functions just compose a pointer dereference with >> a *_to_cpu() byteswap. Instead use ld*_p(), which handles potential >> pointer misaligment and avoids the need to

Re: [Qemu-devel] [PATCH] migration: Don't use *_to_cpup()

2016-06-10 Thread Eric Blake
On 06/10/2016 09:01 AM, Peter Maydell wrote: > The *_to_cpup() functions just compose a pointer dereference with > a *_to_cpu() byteswap. Instead use ld*_p(), which handles potential > pointer misaligment and avoids the need to cast the pointer. s/misaligment/misalignment/ > > Signed-off-by:

[Qemu-devel] [PATCH] migration: Don't use *_to_cpup()

2016-06-10 Thread Peter Maydell
The *_to_cpup() functions just compose a pointer dereference with a *_to_cpu() byteswap. Instead use ld*_p(), which handles potential pointer misaligment and avoids the need to cast the pointer. Signed-off-by: Peter Maydell --- The motivation here is that I'd like to