From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48173) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyGhN-0002CO-RU for qemu-devel@nongnu.org; Mon, 16 Nov 2015 05:07:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyGhI-0005xj-Rf for qemu-devel@nongnu.org; Mon, 16 Nov 2015 05:07:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47254) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyGhI-0005xe-Mb for qemu-devel@nongnu.org; Mon, 16 Nov 2015 05:07:40 -0500 Date: Mon, 16 Nov 2015 10:07:35 +0000 From: "Dr. David Alan Gilbert" Message-ID: <20151116100734.GB2417@work-vm> References: <1447165546-27784-1-git-send-email-quintela@redhat.com> <1447165546-27784-26-git-send-email-quintela@redhat.com> <5647877D.6050201@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5647877D.6050201@weilnetz.de> Subject: Re: [Qemu-devel] [PULL 25/57] 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: Stefan Weil Cc: amit.shah@redhat.com, Paolo Bonzini , qemu-devel@nongnu.org, Juan Quintela * Stefan Weil (sw@weilnetz.de) wrote: > Am 10.11.2015 um 15:25 schrieb Juan Quintela: > > 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 > > Signed-off-by: Juan Quintela > > --- > > include/migration/migration.h | 27 +++++ > > include/sysemu/sysemu.h | 19 ++++ > > migration/migration.c | 20 ++++ > > migration/savevm.c | 254 ++++++++++++++++++++++++++++++++++++++++++ > > trace-events | 10 ++ > > 5 files changed, 330 insertions(+) > > > [...] > > diff --git a/migration/savevm.c b/migration/savevm.c > [...] > > + if (remote_hps != getpagesize()) { > > + /* > > + * Some combinations of mismatch are probably possible but it gets > > + * a bit more complicated. In particular we need to place whole > > + * host pages on the dest at once, and we need to ensure that we > > + * handle dirtying to make sure we never end up sending part of > > + * a hostpage on it's own. > > + */ > > + error_report("Postcopy needs matching host page sizes (s=%d d=%d)", > > + (int)remote_hps, getpagesize()); > > This statement introduces a new warning when compiling for > Windows where getpagesize() returns a size_t. I'll send a patch > to change that definition to return an int value. Interesting; which compiler are you using; I don't think any of us testing with ming hit that. > Is there a special reason why a type cast was used here > instead of using PRIu64? See also the format string below. No not really; to be honest those should probably have been something smaller than 64bit anyway, normal page size being that big would be odd. Dave > Regards > Stefan > > > > + return -1; > > + } > > + > > + remote_tps = qemu_get_be64(mis->from_src_file); > > + if (remote_tps != (1ul << qemu_target_page_bits())) { > > + /* > > + * Again, some differences could be dealt with, but for now keep it > > + * simple. > > + */ > > + error_report("Postcopy needs matching target page sizes (s=%d d=%d)", > > + (int)remote_tps, 1 << qemu_target_page_bits()); > > > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK