qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/6] migration: check required entries and sections are loaded
@ 2023-11-06 11:35 marcandre.lureau
  2023-11-06 11:35 ` [PATCH v3 1/6] block/fdc: 'phase' is not needed on load marcandre.lureau
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: marcandre.lureau @ 2023-11-06 11:35 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Xu, Samuel Thibault, Kevin Wolf, Juan Quintela,
	Fabiano Rosas, Michael S. Tsirkin, Leonardo Bras, qemu-block,
	Hanna Reitz, Jason Wang, John Snow, 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

v3:
 - rebased, drop RFC status
 - switch from tracepoint + returning an error to report for missing
   subsections, as we worry about potential regressions
 - add r-b tags

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 (6):
  block/fdc: 'phase' is not needed on load
  virtio: make endian_needed() work during loading
  migration: check required subsections are loaded, once
  migration: check required entries are loaded, once
  test-vmstate: add some subsection tests
  docs/migration: reflect the changes about needed subsections

 docs/devel/migration.rst  |  17 +++---
 hw/block/fdc.c            |   5 ++
 hw/virtio/virtio.c        |   6 +-
 migration/savevm.c        |  43 ++++++++++++++
 migration/vmstate.c       |  40 ++++++++++++-
 tests/unit/test-vmstate.c | 116 ++++++++++++++++++++++++++++++++++++++
 6 files changed, 215 insertions(+), 12 deletions(-)

-- 
2.41.0



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

end of thread, other threads:[~2023-12-25 15:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-06 11:35 [PATCH v3 0/6] migration: check required entries and sections are loaded marcandre.lureau
2023-11-06 11:35 ` [PATCH v3 1/6] block/fdc: 'phase' is not needed on load marcandre.lureau
2023-11-06 11:35 ` [PATCH v3 2/6] virtio: make endian_needed() work during loading marcandre.lureau
2023-11-06 11:35 ` [PATCH v3 3/6] migration: check required subsections are loaded, once marcandre.lureau
2023-11-06 11:35 ` [PATCH v3 4/6] migration: check required entries " marcandre.lureau
2023-11-06 11:35 ` [PATCH v3 5/6] test-vmstate: add some subsection tests marcandre.lureau
2023-11-06 11:36 ` [PATCH v3 6/6] docs/migration: reflect the changes about needed subsections marcandre.lureau
2023-11-06 17:44 ` [PATCH v3 0/6] migration: check required entries and sections are loaded Michael S. Tsirkin
2023-11-07 12:03   ` Juan Quintela
2023-12-25 15:56 ` Michael S. Tsirkin

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).