This will allow fields to have version_id > vmsd->version_id, to allow us to support loading data with higher version_id.
This patch alone is not useful by itself, but it will be useful when introducing the max_version_id field to VMStateDescription. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- savevm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/savevm.c b/savevm.c index 16276e7..87773ad 100644 --- a/savevm.c +++ b/savevm.c @@ -1766,6 +1766,9 @@ void vmstate_save_state(QEMUFile *f, const VMStateDescription *vmsd, !field->field_exists(opaque, vmsd->version_id)) { continue; } + if (field->version_id > vmsd->version_id) { + continue; + } void *base_addr = opaque + field->offset; int i, n_elems = 1; -- 1.8.3.1