[PATCH v2 0/9] RFC: migration: check required entries and sections are loaded

marcandre.lureau@redhat.com posted 9 patches 6 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231024084043.2926316-1-marcandre.lureau@redhat.com
Maintainers: Juan Quintela <quintela@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Leonardo Bras <leobras@redhat.com>, John Snow <jsnow@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Samuel Thibault <samuel.thibault@ens-lyon.org>, Jason Wang <jasowang@redhat.com>
docs/devel/migration.rst    |  17 +++---
include/migration/vmstate.h |   2 +-
hw/block/fdc.c              |   5 ++
hw/virtio/virtio.c          |   6 +-
migration/savevm.c          |  45 +++++++++++++-
migration/vmstate.c         |  45 ++++++++++++--
net/slirp.c                 |   3 +-
tests/unit/test-vmstate.c   | 116 ++++++++++++++++++++++++++++++++++++
8 files changed, 222 insertions(+), 17 deletions(-)
[PATCH v2 0/9] RFC: migration: check required entries and sections are loaded
Posted by marcandre.lureau@redhat.com 6 months, 1 week ago
From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Surprisingly, the migration code doesn't check that required migration entries
and subsections are loaded. Either optional or required sections are both
ignored when missing. According to the documentation a "newer QEMU that knows
about a subsection can (with care) load a stream from an older QEMU that didn't
send the subsection". I propose this behaviour to be limited to "optional"
sections only.

This series has a few preliminary fixes, add new checks that entries are
loaded once and required ones have been loaded, add some tests and
documentation update.

thanks

v2:
 - add "migration: rename vmstate_save_needed->vmstate_section_needed"
 - add "migration: set file error on subsection loading"
 - add subsection tests
 - update the documentation

Marc-André Lureau (9):
  block/fdc: 'phase' is not needed on load
  virtio: make endian_needed() work during loading
  net/slirp: use different IDs for each instance
  migration: rename vmstate_save_needed->vmstate_section_needed
  migration: check required subsections are loaded, once
  migration: check required entries are loaded, once
  migration: set file error on subsection loading
  test-vmstate: add some subsection tests
  docs/migration: reflect the changes about needed subsections

 docs/devel/migration.rst    |  17 +++---
 include/migration/vmstate.h |   2 +-
 hw/block/fdc.c              |   5 ++
 hw/virtio/virtio.c          |   6 +-
 migration/savevm.c          |  45 +++++++++++++-
 migration/vmstate.c         |  45 ++++++++++++--
 net/slirp.c                 |   3 +-
 tests/unit/test-vmstate.c   | 116 ++++++++++++++++++++++++++++++++++++
 8 files changed, 222 insertions(+), 17 deletions(-)

-- 
2.41.0