qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: "Juan Quintela" <quintela@redhat.com>,
	"qemu list" <qemu-devel@nongnu.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Alexander Graf" <agraf@suse.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis
Date: Wed, 21 May 2014 05:45:25 -0600	[thread overview]
Message-ID: <537C91D5.70508@redhat.com> (raw)
In-Reply-To: <20140513041219.GB29857@grmbl.mre>

[-- Attachment #1: Type: text/plain, Size: 1948 bytes --]

On 05/12/2014 10:12 PM, Amit Shah wrote:
> Hi,
> 
> 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 filename
>>> as a parameter.  When executed, QEMU will dump the vmstate information
>>> 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 for
>>> 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?
> 
> I suppose we should, I thought I should wait for comments here on any
> extra fields that people want.
> 
> I suppose documenting would just be coming up with a schema, though? ...
> 
>>  Is it worth making
>> it part of qapi-schema.json,
> 
> 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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2014-05-21 11:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12 11:16 [Qemu-devel] [PATCH 00/18] migration: add static analysis tool to check vmstate compat between versions Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis Amit Shah
2014-05-12 12:51   ` Eric Blake
2014-05-13  4:12     ` Amit Shah
2014-05-21 11:45       ` Eric Blake [this message]
2014-05-21  9:44   ` Dr. David Alan Gilbert
2014-05-21  9:55     ` Amit Shah
2014-05-21 10:03       ` Dr. David Alan Gilbert
2014-05-21 10:12         ` Amit Shah
2014-05-21 11:47           ` Markus Armbruster
2014-05-21 11:45     ` Markus Armbruster
2014-05-12 11:16 ` [Qemu-devel] [PATCH 02/18] vmstate-static-checker: script to validate vmstate changes Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 03/18] tests: vmstate static checker: add dump1 and dump2 files Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 04/18] tests: vmstate static checker: incompat machine types Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 05/18] tests: vmstate static checker: add version error in main section Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 06/18] tests: vmstate static checker: version mismatch inside a Description Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 07/18] tests: vmstate static checker: minimum_version_id check Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 08/18] tests: vmstate static checker: remove a section Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 09/18] tests: vmstate static checker: remove a field Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 10/18] tests: vmstate static checker: remove last field in a struct Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 11/18] tests: vmstate static checker: change description name Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 12/18] tests: vmstate static checker: remove Fields Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 13/18] tests: vmstate static checker: remove Description Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 14/18] tests: vmstate static checker: remove Description inside Fields Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 15/18] tests: vmstate static checker: remove a subsection Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 16/18] tests: vmstate static checker: remove Subsections Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 17/18] tests: vmstate static checker: add substructure for usb-kbd for hid section Amit Shah
2014-05-12 11:16 ` [Qemu-devel] [PATCH 18/18] tests: vmstate static checker: add size mismatch inside substructure Amit Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537C91D5.70508@redhat.com \
    --to=eblake@redhat.com \
    --cc=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).