* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 21/04/2014 13:34, Peter Maydell ha scritto: > >Mostly just that I think that for vmstate definitions "this new field > >was added in version X" is natural and normal, whereas other > >test functions are odd and generally the exception. So a simple > >way to indicate minimum version for fields seems useful to retain. > >I don't mind if you want to unify the underlying implementation, > >but I would prefer to retain the _V macros for vmstate definitions > >to use (and it has the additional advantage of avoiding the need for > >touching lots of devices...) > > I agree. In many cases, _TEST is a huge review warning sign that > subsections should have been used instead.
I can see how the subsections should be used in some cases, but I've come across at least one case where _TEST was used to avoid the need for a version change. Mst's 9e047b (hw/acpi/piix4.c) replaces an existing field, if a property on the device is set, but if the property is as-before then the structure stays exactly as it was. I can see how that probably should have used a subsection for the new version of the data, but I don't see how it could have otherwise kept it's compatibility. Dave -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK