From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwNYM-000790-FL for qemu-devel@nongnu.org; Mon, 08 Jul 2013 22:21:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwNYE-00061R-3L for qemu-devel@nongnu.org; Mon, 08 Jul 2013 22:21:18 -0400 Date: Tue, 9 Jul 2013 09:57:01 +1000 From: David Gibson Message-ID: <20130708235701.GE2696@voom.redhat.com> References: <1372315560-5478-1-git-send-email-aik@ozlabs.ru> <1372315560-5478-4-git-send-email-aik@ozlabs.ru> <877gh029hi.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WK3l2KTTmXPVedZ6" Content-Disposition: inline In-Reply-To: <877gh029hi.fsf@codemonkey.ws> Subject: Re: [Qemu-devel] [PATCH 03/17] savevm: Implement VMS_DIVIDE flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Alexey Kardashevskiy , qemu-devel@nongnu.org, Alexander Graf , qemu-ppc@nongnu.org, Paolo Bonzini , Paul Mackerras --WK3l2KTTmXPVedZ6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 08, 2013 at 01:27:05PM -0500, Anthony Liguori wrote: > Alexey Kardashevskiy writes: >=20 > > From: David Gibson > > > > The vmstate infrastructure includes a VMS_MULTIPY flag, and associated > > VMSTATE_VBUFFER_MULTIPLY helper macro. These can be used to save a > > variably sized buffer where the size in bytes of the buffer isn't direc= tly > > accessible as a structure field, but an element count from which the si= ze > > can be derived is. >=20 > Why? What's the point of sending the total size vs. the element > count? Because it's more convenient to work with the total size at runtime, and because the VMSTATE stuff works with actual structure fields, there's not really a way to convert it at migrate time, short of this. --=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 --WK3l2KTTmXPVedZ6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iEYEARECAAYFAlHbUc0ACgkQaILKxv3ab8a96QCdEHExKzrxDBisS5efFW0FPNfV eJ0Ani9LTKlgUZ0kbshsi1UaTD4zg+YM =UFFt -----END PGP SIGNATURE----- --WK3l2KTTmXPVedZ6--