[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json fi
From: |
Eric Blake |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 00/18] migration: add static analysis tool to check vmstate compat between versions, Amit Shah, 2014/05/12
- Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis, Dr. David Alan Gilbert, 2014/05/21
- Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis, Amit Shah, 2014/05/21
- Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis, Dr. David Alan Gilbert, 2014/05/21
- Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis, Amit Shah, 2014/05/21
- Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis, Markus Armbruster, 2014/05/21
- Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis, Amit Shah, 2014/05/27
- Re: [Qemu-devel] [PATCH 01/18] migration: dump vmstate info as a json file for static analysis, Markus Armbruster, 2014/05/21
[Qemu-devel] [PATCH 02/18] vmstate-static-checker: script to validate vmstate changes, Amit Shah, 2014/05/12
[Qemu-devel] [PATCH 03/18] tests: vmstate static checker: add dump1 and dump2 files, Amit Shah, 2014/05/12