Allow cpr-reboot for vfio if the guest is in the suspended runstate.  The
guest drivers' suspend methods flush outstanding requests and re-initialize
the devices, and thus there is no device state to save and restore.  The
user is responsible for suspending the guest before initiating cpr, such as
by issuing guest-suspend-ram to the qemu guest agent.

Most of the patches in this series enhance migration notifiers so they can
return an error status and message.  The last two patches register a notifier
for vfio that returns an error if the guest is not suspended.

Steve Sistare (11):
  notify: pass error to notifier with return
  migration: remove error from notifier data
  migration: convert to NotifierWithReturn
  migration: remove migration_in_postcopy parameter
  migration: MigrationEvent for notifiers
  migration: MigrationNotifyFunc
  migration: per-mode notifiers
  migration: refactor migrate_fd_connect failures
  migration: notifier error checking
  vfio: register container for cpr
  vfio: allow cpr-reboot migration if suspended

 hw/net/virtio-net.c            |  14 ++---
 hw/vfio/common.c               |   2 +-
 hw/vfio/container.c            |  11 +++-
 hw/vfio/cpr.c                  |  39 ++++++++++++++
 hw/vfio/meson.build            |   1 +
 hw/vfio/migration.c            |  13 +++--
 hw/virtio/vhost-user.c         |  10 ++--
 hw/virtio/virtio-balloon.c     |   3 +-
 include/hw/vfio/vfio-common.h  |   6 ++-
 include/hw/virtio/virtio-net.h |   2 +-
 include/migration/misc.h       |  21 +++++---
 include/qemu/notify.h          |   7 ++-
 migration/migration.c          | 117 +++++++++++++++++++++++++++--------------
 migration/postcopy-ram.c       |   3 +-
 migration/postcopy-ram.h       |   1 -
 migration/ram.c                |  12 ++---
 net/vhost-vdpa.c               |  15 +++---
 ui/spice-core.c                |  19 +++----
 util/notify.c                  |   5 +-
 19 files changed, 206 insertions(+), 95 deletions(-)
 create mode 100644 hw/vfio/cpr.c

-- 
1.8.3.1


Reply via email to