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

2016-06-12 Thread Amit Shah
On (Fri) 10 Jun 2016 [17:09:22], Peter Maydell wrote: > The *_to_cpup() and cpu_to_*w() functions just compose a pointer > dereference with a byteswap. Instead use ld*_p() and st*_p(), > which handle potential pointer misalignment and avoid the need > to cast the pointer. > > Signed-off-by: Peter

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

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

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

2016-06-10 Thread Peter Maydell
The *_to_cpup() and cpu_to_*w() functions just compose a pointer dereference with a byteswap. Instead use ld*_p() and st*_p(), which handle potential pointer misalignment and avoid the need to cast the pointer. Signed-off-by: Peter Maydell --- Changes v1->v2: fix