From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJf8M-0005yg-Jl for qemu-devel@nongnu.org; Mon, 27 Jul 2015 05:55:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZJf8J-0008FO-9e for qemu-devel@nongnu.org; Mon, 27 Jul 2015 05:55:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZJf8I-0008Dn-K9 for qemu-devel@nongnu.org; Mon, 27 Jul 2015 05:55:43 -0400 Date: Mon, 27 Jul 2015 10:55:34 +0100 From: "Dr. David Alan Gilbert" Message-ID: <20150727095534.GD2374@work-vm> References: <1434450415-11339-1-git-send-email-dgilbert@redhat.com> <1434450415-11339-19-git-send-email-dgilbert@redhat.com> <20150720100620.GA10280@grmbl.mre> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150720100620.GA10280@grmbl.mre> Subject: Re: [Qemu-devel] [PATCH v7 18/42] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, quintela@redhat.com, liang.z.li@intel.com, qemu-devel@nongnu.org, luis@cs.umu.se, pbonzini@redhat.com, david@gibson.dropbear.id.au * Amit Shah (amit.shah@redhat.com) wrote: > On (Tue) 16 Jun 2015 [11:26:31], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > The state of the postcopy process is managed via a series of messages; > > * Add wrappers and handlers for sending/receiving these messages > > * Add state variable that track the current state of postcopy > > > > Signed-off-by: Dr. David Alan Gilbert > > Reviewed-by: Amit Shah Thanks, > But: > > > +void qemu_savevm_send_postcopy_ram_discard(QEMUFile *f, const char *name, > > + uint16_t len, > > + uint64_t *start_list, > > + uint64_t *end_list) > > +{ > > + uint8_t *buf; > > + uint16_t tmplen; > > + uint16_t t; > > + size_t name_len = strlen(name); > > + > > + trace_qemu_savevm_send_postcopy_ram_discard(name, len); > > + buf = g_malloc0(len*16 + name_len + 3); > > + buf[0] = 0; /* Version */ > > + assert(name_len < 256); > > + buf[1] = name_len; > > + memcpy(buf+2, name, name_len); > > + tmplen = 2+name_len; > > + buf[tmplen++] = '\0'; > > whitespace around operators missing > > > +static int loadvm_postcopy_ram_handle_discard(MigrationIncomingState *mis, > > + uint16_t len) > > > + len -= 3+strlen(ramid); > > ditto Fixed. Dave > > Amit -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK