qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] RFC: migration: check required entries and sections are loaded
@ 2023-10-24  8:40 marcandre.lureau
  2023-10-24  8:40 ` [PATCH v2 1/9] block/fdc: 'phase' is not needed on load marcandre.lureau
                   ` (8 more replies)
  0 siblings, 9 replies; 20+ messages in thread
From: marcandre.lureau @ 2023-10-24  8:40 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Michael S. Tsirkin, Fabiano Rosas, John Snow,
	Hanna Reitz, Leonardo Bras, Samuel Thibault, qemu-block, Peter Xu,
	Jason Wang, Juan Quintela, Marc-André Lureau

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



^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2023-10-24 20:12 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24  8:40 [PATCH v2 0/9] RFC: migration: check required entries and sections are loaded marcandre.lureau
2023-10-24  8:40 ` [PATCH v2 1/9] block/fdc: 'phase' is not needed on load marcandre.lureau
2023-10-24  8:40 ` [PATCH v2 2/9] virtio: make endian_needed() work during loading marcandre.lureau
2023-10-24  8:40 ` [PATCH v2 3/9] net/slirp: use different IDs for each instance marcandre.lureau
2023-10-24  9:26   ` Juan Quintela
2023-10-24  8:40 ` [PATCH v2 4/9] migration: rename vmstate_save_needed->vmstate_section_needed marcandre.lureau
2023-10-24 10:35   ` Juan Quintela
2023-10-24  8:40 ` [PATCH v2 5/9] migration: check required subsections are loaded, once marcandre.lureau
2023-10-24 10:41   ` Juan Quintela
2023-10-24 20:10     ` Peter Xu
2023-10-24  8:40 ` [PATCH v2 6/9] migration: check required entries " marcandre.lureau
2023-10-24 10:44   ` Juan Quintela
2023-10-24  8:40 ` [PATCH v2 7/9] migration: set file error on subsection loading marcandre.lureau
2023-10-24  9:27   ` Juan Quintela
2023-10-24  8:40 ` [PATCH v2 8/9] test-vmstate: add some subsection tests marcandre.lureau
2023-10-24 10:45   ` Juan Quintela
2023-10-24  8:40 ` [PATCH v2 9/9] docs/migration: reflect the changes about needed subsections marcandre.lureau
2023-10-24 10:47   ` Juan Quintela
2023-10-24 10:58     ` Marc-André Lureau
2023-10-24 11:08       ` Juan Quintela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).