From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2GGM-0007Xa-DA for qemu-devel@nongnu.org; Thu, 03 Nov 2016 07:32:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2GGH-0002Ep-GQ for qemu-devel@nongnu.org; Thu, 03 Nov 2016 07:32:54 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43948) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2GGH-0002Eh-8b for qemu-devel@nongnu.org; Thu, 03 Nov 2016 07:32:49 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uA3BTI09045633 for ; Thu, 3 Nov 2016 07:32:48 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 26fwh3d0ba-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 03 Nov 2016 07:32:47 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 3 Nov 2016 11:32:45 -0000 References: <1477943636-21024-1-git-send-email-duanj@linux.vnet.ibm.com> <1477943636-21024-3-git-send-email-duanj@linux.vnet.ibm.com> <87k2cm88j0.fsf@emacs.mitica> <64de4199-2588-fc76-a09d-132045a29ed0@redhat.com> <1240d14a-5e7a-ed37-4859-c70032f25e0a@linux.vnet.ibm.com> From: Halil Pasic Date: Thu, 3 Nov 2016 12:32:38 +0100 MIME-Version: 1.0 In-Reply-To: <1240d14a-5e7a-ed37-4859-c70032f25e0a@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Message-Id: <9b92173c-bcf2-88c2-1a8d-02665a6ac282@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [QEMU PATCH v10 2/3] migration: migrate QTAILQ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , quintela@redhat.com, Jianjun Duan Cc: veroniabahaa@gmail.com, peter.maydell@linaro.org, mst@redhat.com, qemu-devel@nongnu.org, mark.cave-ayland@ilande.co.uk, dgilbert@redhat.com, mdroth@linux.vnet.ibm.com, blauwirbel@gmail.com, dmitry@daynix.com, qemu-ppc@nongnu.org, kraxel@redhat.com, david@gibson.dropbear.id.au, amit.shah@redhat.com, kwolf@redhat.com, mreitz@redhat.com, leon.alrae@imgtec.com, aurelien@aurel32.net, rth@twiddle.net 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 >>> 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 >> > [..] > > 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 Sorry guys, I just realized this was stupid of me. Please ignore.