Skip to content

Save state error handling (kill off no_migrate)

Alex Williamson qemu-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/26 patches 0 repliesNew
  2. v1 posting 1/26 patches 19 repliesSuperseded

Patches in v1 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6savevm: Allow SaveStateHandler() to return errorhw/adb.c hw/ads7846.c hw/arm_gic.c +64 more+219 -840 replies
2/6savevm: Allow vmsd->pre_save to return errorhw/fdc.c hw/hpet.c hw/hw.h +10 more+52 -290 replies
3/6pci: Allow pci_device_save() to return errorhw/grackle_pci.c hw/gt64xxx.c hw/ivshmem.c +7 more+29 -210 replies
4/6virtio: Allow virtio_save() errorshw/virtio-balloon.c hw/virtio-blk.c hw/virtio-net.c +4 more+40 -120 replies
5/6savevm: Allow set_params and save_live_state to errorblock-migration.c hw/hw.h savevm.c+19 -50 replies
6/6savevm: Remove register_device_unmigratable()hw/hw.h hw/ivshmem.c savevm.c+14 -390 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [Qemu-devel] [PATCH RESEND 0/6] Save state error handling (kill off no_migrate)

No changes from previous version

--

Our code paths for saving or migrating a VM are full of functions that return void, leaving no opportunity for a device to cancel a migration, either from error or incompatibility. The ivshmem driver attempted to solve this with a no_migrate flag on the save state entry. I think the more generic and flexible way to solve this is to allow driver save functions to fail. This series implements that and converts ivshmem to uses a set_params function to NAK migration much earlier in the processes. This touches a lot of files, but bulk of those changes are simply s/void/int/ and tacking a "return 0" to the end of functions. Thanks,

Alex

---

Alex Williamson (6):
savevm: Remove register_device_unmigratable()
savevm: Allow set_params and save_live_state to error
virtio: Allow virtio_save() errors
pci: Allow pci_device_save() to return error
savevm: Allow vmsd->pre_save to return error
savevm: Allow SaveStateHandler() to return error

 block-migration.c           |    4 +-
 hw/adb.c                    |    8 +++-
 hw/ads7846.c                |    4 +-
 hw/arm_gic.c                |    4 +-
 hw/arm_timer.c              |    6 ++-
 hw/armv7m_nvic.c            |    4 +-
 hw/cuda.c                   |    4 +-
 hw/fdc.c                    |    3 +
 hw/g364fb.c                 |    4 +-
 hw/grackle_pci.c            |    4 +-
 hw/gt64xxx.c                |    4 +-
 hw/heathrow_pic.c           |    4 +-
 hw/hpet.c                   |    3 +
 hw/hw.h                     |   12 ++----
 hw/i2c.c                    |    3 +
 hw/ide/core.c               |    4 +-
 hw/ivshmem.c                |   30 +++++++++++----
 hw/lsi53c895a.c             |    4 +-
 hw/m48t59.c                 |    4 +-
 hw/mac_dbdma.c              |    4 +-
 hw/mac_nvram.c              |    4 +-
 hw/max111x.c                |    4 +-
 hw/mipsnet.c                |    4 +-
 hw/mst_fpga.c               |    3 +
 hw/nand.c                   |    3 +
 hw/openpic.c                |    4 +-
 hw/pci.c                    |    9 +++-
 hw/pci.h                    |    2 -
 hw/piix4.c                  |    4 +-
 hw/pl011.c                  |    4 +-
 hw/pl022.c                  |    4 +-
 hw/pl061.c                  |    4 +-
 hw/ppc4xx_pci.c             |   11 ++++-
 hw/ppce500_pci.c            |   11 ++++-
 hw/pxa2xx.c                 |   28 ++++++++++----
 hw/pxa2xx_dma.c             |    4 +-
 hw/pxa2xx_gpio.c            |    4 +-
 hw/pxa2xx_keypad.c          |    3 +
 hw/pxa2xx_lcd.c             |    4 +-
 hw/pxa2xx_mmci.c            |    4 +-
 hw/pxa2xx_pic.c             |    4 +-
 hw/pxa2xx_timer.c           |    4 +-
 hw/rc4030.c                 |    4 +-
 hw/rtl8139.c                |    4 +-
 hw/serial.c                 |    3 +
 hw/spitz.c                  |   14 +++++--
 hw/ssd0323.c                |    4 +-
 hw/ssi-sd.c                 |    4 +-
 hw/stellaris.c              |   20 +++++++---
 hw/stellaris_enet.c         |    4 +-
 hw/stellaris_input.c        |    4 +-
 hw/syborg_fb.c              |    4 +-
 hw/syborg_interrupt.c       |    3 +
 hw/syborg_keyboard.c        |    3 +
 hw/syborg_pointer.c         |    3 +
 hw/syborg_rtc.c             |    4 +-
 hw/syborg_serial.c          |    4 +-
 hw/syborg_timer.c           |    4 +-
 hw/tsc2005.c                |    4 +-
 hw/tsc210x.c                |    4 +-
 hw/twl92230.c               |    3 +
 hw/unin_pci.c               |    4 +-
 hw/usb-uhci.c               |    3 +
 hw/virtio-balloon.c         |    9 +++-
 hw/virtio-blk.c             |   10 ++++-
 hw/virtio-net.c             |   10 ++++-
 hw/virtio-pci.c             |   10 ++++-
 hw/virtio-serial-bus.c      |   10 ++++-
 hw/virtio.c                 |   14 +++++--
 hw/virtio.h                 |    4 +-
 hw/wm8750.c                 |    3 +
 hw/zaurus.c                 |    4 +-
 qemu-common.h               |    2 -
 savevm.c                    |   88 +++++++++++++++++++------------------------
 slirp/slirp.c               |    6 ++-
 target-arm/machine.c        |    3 +
 target-cris/machine.c       |    3 +
 target-i386/machine.c       |    7 ++-
 target-microblaze/machine.c |    3 +
 target-mips/machine.c       |    3 +
 target-ppc/machine.c        |    3 +
 target-s390x/machine.c      |    3 +
 target-sparc/machine.c      |    3 +
 83 files changed, 364 insertions(+), 181 deletions(-)