> From: Peter Maydell [mailto:peter.mayd...@linaro.org] > Sent: Wednesday, 23 December 2015 11:21 > On 21 December 2015 at 22:25, Andrew Baumann > <andrew.baum...@microsoft.com> wrote: > > >> If you change the VMSTATE layout, you need to bump the version. As > >> this is very common code, it may have stricter version bump > >> requirements. Last I knew however, there was a way to add new fields > >> at the end of VMSD without breaking backwards compatibility. Peter or > >> Juan may know more. > > > > I'll admit that I didn't think about these issues when adding the > > fields, but after a (quick) look at vmstate_save_state() and > > vmstate_load_state(), they seem to be using named fields in a json > > format, so I don't think the order of fields should matter if we are > > adding new ones. > > The on-the-wire format is not json, and order is important; field > names are not sent. > > If we care about migration compatibility I think the recommendation ^^^^^^^^^^ > is to use subsections, rather than marking fields as only existing > in particular versions. (see docs/migration.txt for a discussion > of subsections).
Do we care about migration compatibility for this code? (As far as I can tell, this only matters for migration of SD interfaces across qemu versions, where the previous state was saved in the window between reset and driver initialisation.) Andrew