From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn4xh-0003LH-0A for qemu-devel@nongnu.org; Wed, 21 May 2014 07:45:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn4xc-0006Yn-1H for qemu-devel@nongnu.org; Wed, 21 May 2014 07:45:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9120) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn4xb-0006YY-OW for qemu-devel@nongnu.org; Wed, 21 May 2014 07:45:27 -0400 Message-ID: <537C91D5.70508@redhat.com> Date: Wed, 21 May 2014 05:45:25 -0600 From: Eric Blake MIME-Version: 1.0 References: <5370C3EA.5070506@redhat.com> <20140513041219.GB29857@grmbl.mre> In-Reply-To: <20140513041219.GB29857@grmbl.mre> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VViCNFthsftED9uLaA85x8FPPLCwNH7HD" Subject: Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: Juan Quintela , qemu list , Markus Armbruster , Alexander Graf , Paolo Bonzini , =?UTF-8?B?QW5kcmVhcyBGw6RyYmVy?= , "Dr. David Alan Gilbert" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --VViCNFthsftED9uLaA85x8FPPLCwNH7HD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/12/2014 10:12 PM, Amit Shah wrote: > Hi, >=20 > On (Mon) 12 May 2014 [06:51:54], Eric Blake wrote: >> On 05/12/2014 05:16 AM, Amit Shah wrote: >>> This commit adds a new command, '-dump-vmstate', that takes a filenam= e >>> as a parameter. When executed, QEMU will dump the vmstate informatio= n >>> for the machine type it's invoked with to the file, and quit. >>> >>> The JSON-format output can then be used to compare the vmstate info f= or >>> different QEMU versions, specifically to test whether live migration >>> would break due to changes in the vmstate data. >> >> Are we going to document that JSON format anywhere? >=20 > I suppose we should, I thought I should wait for comments here on any > extra fields that people want. >=20 > I suppose documenting would just be coming up with a schema, though? ..= =2E >=20 >> Is it worth making >> it part of qapi-schema.json, >=20 > but documenting the entire schema is difficult, as each device will > have its own schema text (due to the differing fields). At least > that's how I understand it; please correct me if I'm wrong. If field names form JSON keys, then yes, documenting each device will be its own schema. But if you write things generic enough, you can have a single schema that covers all devices, by ensuring that device-specific field names are supplied only as values, not keys. That is, 'device': { 'name': 'foo', 'fields': { 'field1': 'int32', 'field2': 'int64' } } requires a schema for each device, while 'device': { 'name': 'foo', 'fields': [ { 'name': 'field1', 'type': 'int32' }, { 'name': 'field2', 'type': 'int64' } ] } is generic. It is more verbose and requires more structure, but by isolating device details into values rather than keys, you get rid of the need for per-device schemas. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --VViCNFthsftED9uLaA85x8FPPLCwNH7HD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTfJHVAAoJEKeha0olJ0Nq9asH/Re+Xx0lxLEv9qlYnn6Nwye6 1EgZZ+c5e59Yt62geTu5GUSFM0BaU+KAxTtU90qVBIDxnrdQJQjVUDcta/6QP7eP ErVKZHZmx2Ury66YoRjTy1yEXYv/ZErx3MlKSqSYoM7u19teGSNmKDaVFzHG5kj+ NIzH6Q+ZDgCUdwRjcj2HiDS5kUltyl0Dgl+Z4+hkf23Fi7OmXixRpGCopWH4fQZ/ pDQl9rVGwbJjqOloYyJO1TfNmd8nv1Fb1I9WE6OLd2DufkTrYI8W4HFySeGl3nf3 3gCUnDq+6FEef9KlszxxTfqjDqURAmK/6Y7j+3Wl/TuxvGf6EU/EkrAGeHFlww4= =DIit -----END PGP SIGNATURE----- --VViCNFthsftED9uLaA85x8FPPLCwNH7HD--