From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCYAb-0007K9-GG for qemu-devel@nongnu.org; Mon, 23 Nov 2009 07:37:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCYAW-0007GY-Nv for qemu-devel@nongnu.org; Mon, 23 Nov 2009 07:37:28 -0500 Received: from [199.232.76.173] (port=54018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCYAW-0007GN-AZ for qemu-devel@nongnu.org; Mon, 23 Nov 2009 07:37:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58846) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCYAV-0008Rj-SH for qemu-devel@nongnu.org; Mon, 23 Nov 2009 07:37:24 -0500 Date: Mon, 23 Nov 2009 14:37:21 +0200 From: Gleb Natapov Message-ID: <20091123123721.GM2999@redhat.com> References: <4B0952C9.9010803@redhat.com> <4B095D86.700@codemonkey.ws> <4B09F0CA.3060705@codemonkey.ws> <20091123082659.GC2999@redhat.com> <4B0A55E8.1060105@redhat.com> <20091123093157.GD2999@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] Re: Live migration protocol, device features, ABIs and other beasts List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: Paolo Bonzini , qemu-devel@nongnu.org On Mon, Nov 23, 2009 at 01:29:11PM +0100, Juan Quintela wrote: > Gleb Natapov wrote: > > On Mon, Nov 23, 2009 at 10:29:12AM +0100, Paolo Bonzini wrote: > >> On 11/23/2009 09:26 AM, Gleb Natapov wrote: > >> >>>> >I'd go with chunk instead of feature bits, specifying them like in > >> >>>> >the PNG specification: > >> >>> > >> >>> You mean, each device would have multiple sections? We already use > >> >>> chunks for each device state. > >> >>> > >> >Each device can send device info in multiple formats (each format with > >> >its own ID) and destination will choose the one it supports. > >> > >> First of all, we'd need a mechanism to send _lengths_ of chunks. > > And we need the mechanism to match incoming chunks to a consumer. > > Not relay on order of incoming data. > > We already do that: > see savevm.c:qemu_loadvm_state() > Cool. Didn't know that. > After reading a section, we call find_se(), with searchs for a > matching section, we can do the same for any subsection/chunk/ > > static SaveStateEntry *find_se(const char *idstr, int instance_id) > { > SaveStateEntry *se; > > QTAILQ_FOREACH(se, &savevm_handlers, entry) { > if (!strcmp(se->idstr, idstr) && > instance_id == se->instance_id) > return se; > } > return NULL; > } > > Later, Juan. -- Gleb.