Received: from eggs.gnu.org ([2001:4830:134:3::10]:52111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoVQt-0006WV-Gt for qemu-devel@nongnu.org; Tue, 20 Oct 2015 07:50:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoVQq-000459-8X for qemu-devel@nongnu.org; Tue, 20 Oct 2015 07:50:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoVQq-000452-32 for qemu-devel@nongnu.org; Tue, 20 Oct 2015 07:50:20 -0400 From: Juan Quintela In-Reply-To: <1443515898-3594-25-git-send-email-dgilbert@redhat.com> (David Alan Gilbert's message of "Tue, 29 Sep 2015 09:37:48 +0100") References: <1443515898-3594-1-git-send-email-dgilbert@redhat.com> <1443515898-3594-25-git-send-email-dgilbert@redhat.com> Date: Tue, 20 Oct 2015 13:50:17 +0200 Message-ID: <877fmhvjwm.fsf@neno.neno> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v8 24/54] Add wrappers and handlers for sending/receiving the postcopy-ram migration messages. Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" 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 "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 > + 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 > + > + 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. Later, Juan.