Re: [Qemu-devel] [PATCH 3/4] virtio: modify savevm to have a stable wire format

2012-12-14 Thread Anthony Liguori
Paolo Bonzini writes: > Il 14/12/2012 01:57, Rusty Russell ha scritto: >> With the new code we only need the head from that structure. > > We also need to do again all validation of the elements if we fetch it > back from the data. Sometimes the parsed data is saved elsewhere (e.g. > in a SCSIRe

Re: [Qemu-devel] [PATCH 3/4] virtio: modify savevm to have a stable wire format

2012-12-14 Thread Paolo Bonzini
Il 14/12/2012 01:57, Rusty Russell ha scritto: > With the new code we only need the head from that structure. We also need to do again all validation of the elements if we fetch it back from the data. Sometimes the parsed data is saved elsewhere (e.g. in a SCSIRequest struct that is serialized by

Re: [Qemu-devel] [PATCH 3/4] virtio: modify savevm to have a stable wire format

2012-12-13 Thread Rusty Russell
Anthony Liguori writes: > Rusty Russell writes: > >> Anthony Liguori writes: >>> We were memcpy()'ing a structure to the wire :-/ Since savevm really >>> only works on x86 today, lets just declare that this element is sent >>> over the wire as a little endian value in order to fix the bitness.

Re: [Qemu-devel] [PATCH 3/4] virtio: modify savevm to have a stable wire format

2012-12-10 Thread Anthony Liguori
Rusty Russell writes: > Anthony Liguori writes: >> We were memcpy()'ing a structure to the wire :-/ Since savevm really >> only works on x86 today, lets just declare that this element is sent >> over the wire as a little endian value in order to fix the bitness. >> >> Unfortunately, we also sen

Re: [Qemu-devel] [PATCH 3/4] virtio: modify savevm to have a stable wire format

2012-12-10 Thread Rusty Russell
Anthony Liguori writes: > We were memcpy()'ing a structure to the wire :-/ Since savevm really > only works on x86 today, lets just declare that this element is sent > over the wire as a little endian value in order to fix the bitness. > > Unfortunately, we also send raw pointers and size_t which

[Qemu-devel] [PATCH 3/4] virtio: modify savevm to have a stable wire format

2012-12-10 Thread Anthony Liguori
We were memcpy()'ing a structure to the wire :-/ Since savevm really only works on x86 today, lets just declare that this element is sent over the wire as a little endian value in order to fix the bitness. Unfortunately, we also send raw pointers and size_t which are going to be different values