Re: [Qemu-devel] [PATCH] vmstate: Add VMSTATE_OPAQUE to save/load complex data structures

2019-05-24 Thread Peter Maydell
On Fri, 24 May 2019 at 18:00, Roman Kiryanov wrote: > > Hi Peter, > > > In any case, migration state on the wire needs to be > > architecture/endianness/ > > Could you please point how the proposed change is > architecture/endianness/ dependent? That's really hard to say, because this patch doesn

Re: [Qemu-devel] [PATCH] vmstate: Add VMSTATE_OPAQUE to save/load complex data structures

2019-05-24 Thread Roman Kiryanov via Qemu-devel
Hi Peter, > In any case, migration state on the wire needs to be > architecture/endianness/ Could you please point how the proposed change is architecture/endianness/ dependent? > implementation-independent, Could you please elaborate, what "implementation" you mean here? > so you can't just s

Re: [Qemu-devel] [PATCH] vmstate: Add VMSTATE_OPAQUE to save/load complex data structures

2019-05-24 Thread Peter Maydell
On Thu, 23 May 2019 at 18:02, Roman Kiryanov via Qemu-devel wrote: > > Hi Dave, thank you for looking. > > > Can you give me an example of where you would use it? > > We use it in our host memory sharing device. I used the existing > macros for all fields I could, but unfortunately some state does

Re: [Qemu-devel] [PATCH] vmstate: Add VMSTATE_OPAQUE to save/load complex data structures

2019-05-23 Thread Roman Kiryanov via Qemu-devel
Hi Dave, thank you for looking. > Can you give me an example of where you would use it? We use it in our host memory sharing device. I used the existing macros for all fields I could, but unfortunately some state does not fit into them. We use this new macro to save/load memory allocators (for no

Re: [Qemu-devel] [PATCH] vmstate: Add VMSTATE_OPAQUE to save/load complex data structures

2019-05-23 Thread Dr. David Alan Gilbert
* rkir--- via Qemu-devel (qemu-devel@nongnu.org) wrote: > From: Roman Kiryanov > > VMSTATE_OPAQUE allows passing user defined functions to save > and load vmstate for cases when data structures do not fit > into int/struct/array terms. > > Signed-off-by: Roman Kiryanov Hi Roman, Thanks for t

[Qemu-devel] [PATCH] vmstate: Add VMSTATE_OPAQUE to save/load complex data structures

2019-05-22 Thread rkir--- via Qemu-devel
From: Roman Kiryanov VMSTATE_OPAQUE allows passing user defined functions to save and load vmstate for cases when data structures do not fit into int/struct/array terms. Signed-off-by: Roman Kiryanov --- include/migration/vmstate.h | 13 + 1 file changed, 13 insertions(+) diff --g