Re: [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ

2016-11-03 Thread Halil Pasic
On 11/03/2016 12:14 PM, Halil Pasic wrote: > > > On 11/02/2016 05:38 PM, Paolo Bonzini wrote: >> >> >> On 02/11/2016 11:45, Juan Quintela wrote: > +while (qemu_get_byte(f)) { > +elm = g_malloc(size); >>> I think this is not generic enough. We really need to allocate a new >

Re: [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ

2016-11-03 Thread Halil Pasic
On 11/02/2016 05:38 PM, Paolo Bonzini wrote: > > > On 02/11/2016 11:45, Juan Quintela wrote: +while (qemu_get_byte(f)) { +elm = g_malloc(size); >> I think this is not generic enough. We really need to allocate a new >> element, and then fill it with default values. >> >>

Re: [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ

2016-11-02 Thread Jianjun Duan
On 11/02/2016 03:45 AM, Juan Quintela wrote: > Jianjun Duan wrote: >> Currently we cannot directly transfer a QTAILQ instance because of the >> limitation in the migration code. Here we introduce an approach to >> transfer such structures. We created VMStateInfo vmstate_info_qtailq >> for QTAILQ

Re: [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ

2016-11-02 Thread Paolo Bonzini
On 02/11/2016 11:45, Juan Quintela wrote: >> > +while (qemu_get_byte(f)) { >> > +elm = g_malloc(size); > I think this is not generic enough. We really need to allocate a new > element, and then fill it with default values. > > virtio list code use it in this way. One thing at a tim

Re: [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ

2016-11-02 Thread Juan Quintela
Jianjun Duan wrote: > Currently we cannot directly transfer a QTAILQ instance because of the > limitation in the migration code. Here we introduce an approach to > transfer such structures. We created VMStateInfo vmstate_info_qtailq > for QTAILQ. Similar VMStateInfo can be created for other data s

[Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ

2016-10-31 Thread Jianjun Duan
Currently we cannot directly transfer a QTAILQ instance because of the limitation in the migration code. Here we introduce an approach to transfer such structures. We created VMStateInfo vmstate_info_qtailq for QTAILQ. Similar VMStateInfo can be created for other data structures such as list. This