[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 02/18] vmstate-static-checker: script to vali
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH v4 02/18] vmstate-static-checker: script to validate vmstate changes |
Date: |
Wed, 18 Jun 2014 13:25:50 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Amit Shah <address@hidden> wrote:
> On (Wed) 18 Jun 2014 [12:44:12], Juan Quintela wrote:
>> Amit Shah <address@hidden> wrote:
>> > This script compares the vmstate dumps in JSON format as output by QEMU
>> > with the -dump-vmstate option.
>> >
>> > It flags various errors, like version mismatch, sections going away,
>> > size mismatches, etc.
>> >
>> > This script is tolerant of a few changes that do not change the on-wire
>> > format, like embedding a few fields within substructs.
>> >
>> > The script takes -s/--src and -d/--dest parameters, to which filenames
>> > are given as arguments.
>> >
>> > Signed-off-by: Amit Shah <address@hidden>
>>
>>
>>
>> > +def check_fields_match(s_field, d_field):
>> > + if s_field == d_field:
>> > + return True
>> > +
>> > + # Some fields changed names between qemu versions. This list
>> > + # is used to whitelist such changes.
>> > + changed_names = [
>> > + ['d', 'dev', 'pcidev', 'pci_dev', 'parent_obj'],
>> > + ['card', 'parent_obj'],
>> > + ['bridge.dev', 'parent_obj'],
>> > + ['br.dev', 'parent_obj.parent_obj'],
>> > + ['port.br.dev', 'parent_obj.parent_obj.parent_obj'],
>> > + ['port.br.dev.exp.aer_log',
>> > + 'parent_obj.parent_obj.parent_obj.exp.aer_log'],
>> > + ['br.dev.exp.aer_log',
>> > + 'parent_obj.parent_obj.exp.aer_log'],
>> > + ['shpc', 'bridge.dev.shpc'],
>> > + ['pci0_status',
>> > + 'acpi_pci_hotplug.acpi_pcihp_pci_status[0x0]'],
>> > + ['pci_irq_levels', 'pci_irq_levels_vmstate'],
>> > + ['usb-ptr-queue', 'HIDPointerEventQueue'],
>> > + ['num_surfaces', 'ssd.num_surfaces'],
>> > + ['timer', 'timer_expiry'],
>> > + ]
>>
>> I expect this not to be very big, so ... could we prepend the VMState
>> description name on this?
>>
>> "usb-ptr-queue" and "HIDPointerEventQueue" are quite descriptive, but
>>
>> "d" "dev" "pci_dev" ...
>>
>> I am not sure that we want to do this translation for any
>> VMSTateDescription. In particular, we are ending that parent_obj can
>> match with anything :-()
>
> Hm; so a 1-1 mapping of stuff that changed. A similar mapping will
> have to be created for all vmsds.
>
> I'll take a look at it.
>
> Do you want to hold off this series till that, or should I just send a
> follow-up patch (series) once I get something?
No, we can change that later.
Just asked Peter on irc, if nobody complains, as this is new code, I
would integrate on next PULL request.
Later, Juan.
[Qemu-devel] [PATCH v4 03/18] tests: vmstate static checker: add dump1 and dump2 files, Amit Shah, 2014/06/18
[Qemu-devel] [PATCH v4 04/18] tests: vmstate static checker: incompat machine types, Amit Shah, 2014/06/18
[Qemu-devel] [PATCH v4 05/18] tests: vmstate static checker: add version error in main section, Amit Shah, 2014/06/18
[Qemu-devel] [PATCH v4 06/18] tests: vmstate static checker: version mismatch inside a Description, Amit Shah, 2014/06/18
[Qemu-devel] [PATCH v4 07/18] tests: vmstate static checker: minimum_version_id check, Amit Shah, 2014/06/18