From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqgnJ-00082t-If for qemu-devel@nongnu.org; Mon, 26 Oct 2015 08:22:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZqgnF-0001Ie-Lc for qemu-devel@nongnu.org; Mon, 26 Oct 2015 08:22:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZqgnF-0001IX-GY for qemu-devel@nongnu.org; Mon, 26 Oct 2015 08:22:29 -0400 Date: Mon, 26 Oct 2015 12:22:23 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20151026122223.GD2500@work-vm> References: <1443515898-3594-1-git-send-email-dgilbert@redhat.com> <1443515898-3594-25-git-send-email-dgilbert@redhat.com> <877fmhvjwm.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877fmhvjwm.fsf@neno.neno> Subject: Re: [Qemu-devel] [PATCH v8 24/54] 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: Juan Quintela Cc: aarcange@redhat.com, liang.z.li@intel.com, qemu-devel@nongnu.org, luis@cs.umu.se, bharata@linux.vnet.ibm.com, amit.shah@redhat.com, pbonzini@redhat.com * Juan Quintela (quintela@redhat.com) wrote: > "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 > > Reviewed-by: Juan Quintela > > > > + tmp[0] = cpu_to_be64(getpagesize()); > > + tmp[1] = cpu_to_be64(1ul << qemu_target_page_bits()); > > we don't have a qemu_target_pagesize()? > > #fail Well we didn't even have qemu_target_page_bits() until patch 1 - I could add pagesize as well if you prefer? > > + qemu_savevm_command_send(f, MIG_CMD_POSTCOPY_LISTEN, 0, NULL); > > Should we create a macro > > qemu_savevm_command_noargs_send(f, MIG_CMD_POSTCOPY_LISTEN); > > It is a "bit" clear, but saves a "whole" byte. Not convinced one way or > other :-p Doesn't seem worth it to me. > > + > > + case MIG_CMD_POSTCOPY_ADVISE: > > + tmp64a = qemu_get_be64(f); /* hps */ > > + tmp64b = qemu_get_be64(f); /* tps */ > > + return loadvm_postcopy_handle_advise(mis, tmp64a, tmp64b); > > In the rest of the commands, you read the arguments inside the > loadvm_postocpy_handle_*(), I think you should do the same here. Hmm; actually most of them I don't do it in the handle_ function, only the ones that were dynamically sized I do; however it is neater doing it that way so I'll change all the places in that switch to do it in the handle. Dave > > Later, Juan. -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK