From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50316) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlT62-00007k-0X for qemu-devel@nongnu.org; Mon, 03 Nov 2014 20:39:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XlT5n-0006Fl-P0 for qemu-devel@nongnu.org; Mon, 03 Nov 2014 20:39:45 -0500 Received: from ozlabs.org ([103.22.144.67]:46668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XlT5n-0006F9-Cy for qemu-devel@nongnu.org; Mon, 03 Nov 2014 20:39:31 -0500 Date: Tue, 4 Nov 2014 12:33:48 +1100 From: David Gibson Message-ID: <20141104013348.GE27321@voom.fritz.box> References: <1412358473-31398-1-git-send-email-dgilbert@redhat.com> <1412358473-31398-25-git-send-email-dgilbert@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="IU5/I01NYhRvwH70" Content-Disposition: inline In-Reply-To: <1412358473-31398-25-git-send-email-dgilbert@redhat.com> Subject: Re: [Qemu-devel] [PATCH v4 24/47] Allow savevm handlers to state whether they could go into postcopy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: aarcange@redhat.com, yamahata@private.email.ne.jp, lilei@linux.vnet.ibm.com, quintela@redhat.com, cristian.klein@cs.umu.se, qemu-devel@nongnu.org, amit.shah@redhat.com, yanghy@cn.fujitsu.com --IU5/I01NYhRvwH70 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 03, 2014 at 06:47:30PM +0100, Dr. David Alan Gilbert (git) wrot= e: > From: "Dr. David Alan Gilbert" >=20 > Use that to split the qemu_savevm_state_pending counts into postcopiable > and non-postcopiable amounts >=20 > Signed-off-by: Dr. David Alan Gilbert > --- > arch_init.c | 7 +++++++ > include/migration/vmstate.h | 2 +- > include/sysemu/sysemu.h | 4 +++- > migration.c | 9 ++++++++- > savevm.c | 23 +++++++++++++++++++---- > 5 files changed, 38 insertions(+), 7 deletions(-) >=20 > diff --git a/arch_init.c b/arch_init.c > index 6970733..44072d8 100644 > --- a/arch_init.c > +++ b/arch_init.c > @@ -1192,6 +1192,12 @@ static int ram_load(QEMUFile *f, void *opaque, int= version_id) > return ret; > } > =20 > +/* RAM's always up for postcopying */ > +static bool ram_can_postcopy(void *opaque) > +{ > + return true; > +} > + > static SaveVMHandlers savevm_ram_handlers =3D { > .save_live_setup =3D ram_save_setup, > .save_live_iterate =3D ram_save_iterate, > @@ -1199,6 +1205,7 @@ static SaveVMHandlers savevm_ram_handlers =3D { > .save_live_pending =3D ram_save_pending, > .load_state =3D ram_load, > .cancel =3D ram_migration_cancel, > + .can_postcopy =3D ram_can_postcopy, Is there actually any plausible device for which you'd need a callback here, rather than just having a static bool? On the other hand, it does seem kind of plausible that there might be situations in which some data from a device must be pre-copied, but more can be post-copied, which would necessitate extending the per-handler callback to return quantities for both. --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --IU5/I01NYhRvwH70 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUWCz8AAoJEGw4ysog2bOSsSsP/Akc84nAyMfqZ6ZpabENrHa5 Ly2wQWmA3kj748NBpZXPNzZGnKjzWpo37E98lGTtzVtuKbo+GFA0ZudukR1NG1x6 I59KmjJDzb8Gz3Pc5E7NIZiPJB/zgIO46lhzipKBTu1qq23zUWEf9fdpUD/aLcA8 nRDF0oIkF95ksmYF30TaRXAnXCyXz0UjbMj0gzhSwkFpL9UvmMWZhwoetsd7Xk+s 0Ge+MZ+gIMzRRcaPk90TDWNW2dxFu+8o2QPqs26sd5vmp+fq3HqgHsGxHEx71T2R P3W2Vm10zRGryiuC4ocmB/zfQ2oyVuyVLbgiUGi1zphD3ze/ZI8fyd6NUdfc/70p Lrjc91wT9BDyoOW8HMnWMRD1sQNzJgjsxVKiiA/ASVuBbdnmLG4Ai21IpL7osC2f bR5sZMTV+E4Yk15ySrn3g8dIL1LnQr+xRwg3VqTahFRkbxLh8AUsuAosO2JddiZa rJPGXscQ1nLI4Q7wfnWVQL4OhPkmmnsORzEwDAn8uiDWzERpT5W+rSGugNu1qsJ5 doY4FHY6s693rxei+sp1P/dsLWpnhpRoEhN01w6dSEDC4Dkfi5rW3HowUpHC4ynF s2uHlplh10+HBXxm2GnCxnuGE82N2GNE4XpHl5AzCB2Pjwe/xjNSYgHMAXq2XKfL BabSBkx6qoOk4/+YsBgj =euyC -----END PGP SIGNATURE----- --IU5/I01NYhRvwH70--