qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Halil Pasic <pasic@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	quintela@redhat.com, Jianjun Duan <duanj@linux.vnet.ibm.com>
Cc: veroniabahaa@gmail.com, peter.maydell@linaro.org,
	dgilbert@redhat.com, mdroth@linux.vnet.ibm.com, mst@redhat.com,
	mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org,
	mreitz@redhat.com, blauwirbel@gmail.com, amit.shah@redhat.com,
	qemu-ppc@nongnu.org, kraxel@redhat.com, dmitry@daynix.com,
	kwolf@redhat.com, rth@twiddle.net, leon.alrae@imgtec.com,
	aurelien@aurel32.net, david@gibson.dropbear.id.au
Subject: Re: [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ
Date: Thu, 3 Nov 2016 12:14:01 +0100	[thread overview]
Message-ID: <1240d14a-5e7a-ed37-4859-c70032f25e0a@linux.vnet.ibm.com> (raw)
In-Reply-To: <64de4199-2588-fc76-a09d-132045a29ed0@redhat.com>



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.
>>
>> virtio list code use it in this way.
> 
> One thing at a time?  The allocation and "looping" are different
> mechanisms.  We can customize the allocation later.
> 
> Paolo
> 

+1

And while at it how about s/g_malloc/gmalloc0? This would possibly make
something like mismatch in .start between source and target easier to
detect, along with the 'untouched' fields mentioned by Jianjun.
(Although I'm not sure how untouched fields and the virtio list use is
connected. In my understanding the problem pointed out by Juan has
something to do with the address of a element/node having significance
beyond the list.)

Halil

  reply	other threads:[~2016-11-03 11:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-31 19:53 [Qemu-devel] [QEMU PATCH v10 0/3] migration: migrate QTAILQ Jianjun Duan
2016-10-31 19:53 ` [Qemu-devel] [QEMU PATCH v10 1/3] migration: extend VMStateInfo Jianjun Duan
2016-11-02 10:40   ` Juan Quintela
2016-11-02 16:54     ` Jianjun Duan
2016-11-03 10:18       ` Juan Quintela
2016-10-31 19:53 ` [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ Jianjun Duan
2016-11-02 10:45   ` Juan Quintela
2016-11-02 16:38     ` Paolo Bonzini
2016-11-03 11:14       ` Halil Pasic [this message]
2016-11-03 11:32         ` Halil Pasic
2016-11-02 17:05     ` Jianjun Duan
2016-10-31 19:53 ` [Qemu-devel] [QEMU PATCH v10 3/3] tests/migration: Add test for QTAILQ migration Jianjun Duan
2016-11-02 10:47   ` Juan Quintela
2016-11-03 12:22     ` Halil Pasic
2016-11-03 16:47       ` Jianjun Duan
2016-11-03 17:17         ` Halil Pasic
2016-11-03 18:40           ` Jianjun Duan
2016-11-03 18:51             ` Halil Pasic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1240d14a-5e7a-ed37-4859-c70032f25e0a@linux.vnet.ibm.com \
    --to=pasic@linux.vnet.ibm.com \
    --cc=amit.shah@redhat.com \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dgilbert@redhat.com \
    --cc=dmitry@daynix.com \
    --cc=duanj@linux.vnet.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=leon.alrae@imgtec.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    --cc=veroniabahaa@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).