From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9usd-0007F4-Fh for qemu-devel@nongnu.org; Mon, 06 Jun 2016 09:47:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9usX-0002p4-K8 for qemu-devel@nongnu.org; Mon, 06 Jun 2016 09:47:46 -0400 References: <1464717764-9040-1-git-send-email-duanj@linux.vnet.ibm.com> <1464717764-9040-5-git-send-email-duanj@linux.vnet.ibm.com> <877fe7iqj3.fsf@oc4731375738.ibm.com> From: Paolo Bonzini Message-ID: <2cd6336c-be92-acb7-6e26-a345c38c9bc7@redhat.com> Date: Mon, 6 Jun 2016 15:47:28 +0200 MIME-Version: 1.0 In-Reply-To: <877fe7iqj3.fsf@oc4731375738.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [QEMU RFC PATCH v3 4/6] Migration: migrate QTAILQ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sascha Silbe , Jianjun Duan , qemu-devel@nongnu.org Cc: veroniabahaa@gmail.com, peter.maydell@linaro.org, mst@redhat.com, quintela@redhat.com, mark.cave-ayland@ilande.co.uk, mdroth@linux.vnet.ibm.com, mreitz@redhat.com, blauwirbel@gmail.com, amit.shah@redhat.com, qemu-ppc@nongnu.org, kraxel@redhat.com, kwolf@redhat.com, dmitry@daynix.com, rth@twiddle.net, leon.alrae@imgtec.com, aurelien@aurel32.net, david@gibson.dropbear.id.au On 02/06/2016 17:01, Sascha Silbe wrote: >> > + /* For fields which need customized handling, such as QTAILQ in queue.h*/ >> > + VMS_CSTM = 0x8000, > Can you describe (in the comment) how this customised handling is > performed, please? I.e. describe what exactly happens if the flag is > set, from the point of view of an API consumer. > > Also, why do you need this flag at all? The only change I can see is > that you pass additional information to VMStateInfo.get() / .put(), > using NULL if it's not set. Why don't you just always pass the > additional information? If the additional information is not needed by > get() / put() the parameter will be unused anyway. Having the flag seemed like a good idea to me, because it gives a specific meaning to the offset fields in the VMStateField. On the other hand, it's true that it's unused... Paolo