Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-11 Thread Paolo Bonzini
On 10/10/2016 23:29, Jianjun Duan wrote: > You are right. What we have in VMSTATE now cannot handle a recursive (or > cyclic as you call it) structure. The idea was to use VMS_LINKED to > indicate a recursive structure. Sure, but it's unnecessary. If you didn't have VMS_LINKED, no one would

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-10 Thread Jianjun Duan
On 10/08/2016 12:28 PM, Halil Pasic wrote: > > > On 10/08/2016 01:37 PM, Paolo Bonzini wrote: >>> Even though most put/get have no issues now, when somebody writes a new put, he or she could run into issues if only checking the type signature. It makes the code more readable. > >>

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-10 Thread Jianjun Duan
On 10/08/2016 12:28 PM, Halil Pasic wrote: > > > On 10/08/2016 01:37 PM, Paolo Bonzini wrote: >>> Even though most put/get have no issues now, when somebody writes a new put, he or she could run into issues if only checking the type signature. It makes the code more readable. > >>

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-08 Thread Halil Pasic
On 10/08/2016 01:37 PM, Paolo Bonzini wrote: >> Even though most put/get have no issues now, when somebody writes a new >> > put, he or she could run into issues if only checking the type >> > signature. It makes the code more readable. > No, it doesn't because one is left wondering what is

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-08 Thread Paolo Bonzini
On 07/10/2016 19:43, Jianjun Duan wrote: > Even though most put/get have no issues now, when somebody writes a new > put, he or she could run into issues if only checking the type > signature. It makes the code more readable. No, it doesn't because one is left wondering what is VMS_LINKED

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-07 Thread Jianjun Duan
On 10/07/2016 10:34 AM, Dr. David Alan Gilbert wrote: > * Jianjun Duan (du...@linux.vnet.ibm.com) wrote: >> >> >> On 10/07/2016 09:32 AM, Paolo Bonzini wrote: >>> >>> >>> On 07/10/2016 18:31, Jianjun Duan wrote: On 10/07/2016 07:34 AM, Dr. David Alan Gilbert wrote: > * Paolo

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-07 Thread Jianjun Duan
On 10/07/2016 09:32 AM, Paolo Bonzini wrote: > > > On 07/10/2016 18:31, Jianjun Duan wrote: >> >> >> On 10/07/2016 07:34 AM, Dr. David Alan Gilbert wrote: >>> * Paolo Bonzini (pbonz...@redhat.com) wrote: On 06/10/2016 21:01, Dr. David Alan Gilbert wrote: +

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-07 Thread Dr. David Alan Gilbert
* Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > > > On 10/07/2016 09:32 AM, Paolo Bonzini wrote: > > > > > > On 07/10/2016 18:31, Jianjun Duan wrote: > >> > >> > >> On 10/07/2016 07:34 AM, Dr. David Alan Gilbert wrote: > >>> * Paolo Bonzini (pbonz...@redhat.com) wrote: > > >

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-07 Thread Jianjun Duan
On 10/07/2016 07:34 AM, Dr. David Alan Gilbert wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: >> >> >> On 06/10/2016 21:01, Dr. David Alan Gilbert wrote: >> +} else if (field->flags & VMS_LINKED) { >> +ret = field->info->get(f, addr, size,

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 4/6] migration: migrate QTAILQ

2016-10-07 Thread Paolo Bonzini
On 07/10/2016 18:31, Jianjun Duan wrote: > > > On 10/07/2016 07:34 AM, Dr. David Alan Gilbert wrote: >> * Paolo Bonzini (pbonz...@redhat.com) wrote: >>> >>> >>> On 06/10/2016 21:01, Dr. David Alan Gilbert wrote: >>> +} else if (field->flags & VMS_LINKED) { >>> +