Skip to content

migration: let pre_save fail

Dr. David Alan Gilbert (git) qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 24 repliesIn review
  2. v15 patches 11 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6migration: pre_save return intdocs/devel/migration.txt hw/arm/pxa2xx.c hw/arm/strongarm.c +56 more+199 -706 replies
2/6migration: check pre_save return in vmstate_save_stateinclude/migration/vmstate.h migration/trace-events migration/vmstate.c+13 -43 replies
3/6migration: Check field save returnsmigration/vmstate.c+12 -33 replies
4/6migration: wire vmstate_save_state errors up to vmstate_subsection_savemigration/vmstate.c+12 -84 replies
5/6migration: Route errors up through vmstate_savemigration/savevm.c+14 -53 replies
6/6migration: Route more error pathshw/display/virtio-gpu.c hw/virtio/virtio.c include/hw/virtio/virtio.h +2 more+23 -164 replies

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchPeter XuCornelia HuckJuan Quintela
1/6R-b R-b R-b
2/6R-b R-b R-b
3/6R-b R-b R-b
4/6R-b R-b R-b
5/6R-b R-b R-b
6/6R-b R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [Qemu-devel] [PATCH v2 0/6] migration: let pre_save fail

From: "Dr. David Alan Gilbert" <[email protected]>

At the moment the pre-save method on VMStateDescription returns void which means there's no sane way of a pre_save routine failing. There are quite a few pre_save's that abort or do other nasty things, and it would be better if they could fail cleanly.

This patch series doesn't fix any of those pre_save's - it just changes pre_save to return an error value and routes that back up so the migration fails. I'll leave that up to the individual device owners.

There are a bunch of corner cases that I've not fixed yet; these are mostly places that call vmstate_save_state which have been partially converted to modern migration code; often the functions they're called from return void as well - they can get fixed later.

v2
test: Split assert/side effects [Fam]
new patch 3: Changed to also check the return of the ->put methods
that should have been checked previously. [Peter]

Dr. David Alan Gilbert (6):
migration: pre_save return int
migration: check pre_save return in vmstate_save_state
migration: Check field save returns
migration: wire vmstate_save_state errors up to
vmstate_subsection_save
migration: Route errors up through vmstate_save
migration: Route more error paths

 docs/devel/migration.txt       |  2 +-
 hw/arm/pxa2xx.c                |  4 +++-
 hw/arm/strongarm.c             |  4 +++-
 hw/audio/wm8750.c              |  4 +++-
 hw/block/fdc.c                 |  4 +++-
 hw/block/m25p80.c              |  4 +++-
 hw/block/nand.c                |  4 +++-
 hw/block/onenand.c             |  4 +++-
 hw/char/serial.c               |  4 +++-
 hw/display/qxl.c               |  4 +++-
 hw/display/virtio-gpu.c        |  4 +---
 hw/i2c/core.c                  |  4 +++-
 hw/i386/kvm/clock.c            |  4 +++-
 hw/ide/core.c                  |  4 +++-
 hw/ide/pci.c                   |  4 +++-
 hw/input/ps2.c                 |  8 ++++++--
 hw/input/tsc210x.c             |  4 +++-
 hw/intc/apic_common.c          |  4 +++-
 hw/intc/arm_gic_common.c       |  4 +++-
 hw/intc/arm_gicv3_common.c     |  4 +++-
 hw/intc/arm_gicv3_its_common.c |  4 +++-
 hw/intc/i8259_common.c         |  4 +++-
 hw/intc/ioapic_common.c        |  4 +++-
 hw/intc/s390_flic_kvm.c        |  6 ++++--
 hw/intc/xics.c                 |  8 ++++++--
 hw/net/e1000.c                 |  4 +++-
 hw/net/e1000e.c                |  4 +++-
 hw/net/rtl8139.c               |  4 +++-
 hw/net/virtio-net.c            | 16 ++++++++++++----
 hw/net/vmxnet3.c               |  4 +++-
 hw/pci-host/piix.c             |  4 +++-
 hw/ppc/ppc.c                   |  4 +++-
 hw/ppc/spapr_iommu.c           |  4 +++-
 hw/ppc/spapr_pci.c             |  6 ++++--
 hw/s390x/css.c                 | 10 +++++++---
 hw/s390x/virtio-ccw.c          |  4 +++-
 hw/scsi/lsi53c895a.c           |  4 +++-
 hw/scsi/vmw_pvscsi.c           |  4 +++-
 hw/timer/cadence_ttc.c         |  4 +++-
 hw/timer/hpet.c                |  4 +++-
 hw/timer/i8254_common.c        |  4 +++-
 hw/timer/mc146818rtc.c         |  4 +++-
 hw/timer/pl031.c               |  4 +++-
 hw/timer/twl92230.c            |  4 +++-
 hw/usb/dev-smartcard-reader.c  |  4 +++-
 hw/usb/hcd-ehci.c              |  4 +++-
 hw/usb/redirect.c              |  4 +++-
 hw/virtio/vhost-vsock.c        |  4 +++-
 hw/virtio/virtio.c             | 13 +++++++------
 include/hw/virtio/virtio.h     |  2 +-
 include/migration/vmstate.h    |  6 +++---
 migration/colo-comm.c          |  4 +++-
 migration/global_state.c       |  4 +++-
 migration/savevm.c             | 23 ++++++++++++++++------
 migration/trace-events         |  1 +
 migration/vmstate-types.c      | 11 ++++++++---
 migration/vmstate.c            | 43 +++++++++++++++++++++++++++++++-----------
 replay/replay-snapshot.c       |  4 +++-
 slirp/slirp.c                  |  8 ++++++--
 target/arm/machine.c           |  4 +++-
 target/i386/machine.c          |  7 +++++--
 target/ppc/machine.c           |  4 +++-
 target/s390x/machine.c         |  4 +++-
 target/sparc/machine.c         |  4 +++-
 tests/test-vmstate.c           | 13 +++++++++----
 65 files changed, 271 insertions(+), 104 deletions(-)
Signature · 1 line
2.13.5