[PATCH 0/5] migration: Notifier fixes for 11.0

Peter Xu posted 5 patches 2 days, 9 hours ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260122230331.3543312-1-peterx@redhat.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Peter Xu <peterx@redhat.com>, Fabiano Rosas <farosas@suse.de>, Mark Kanda <mark.kanda@oracle.com>, Ben Chaney <bchaney@akamai.com>, Alex Williamson <alex@shazbot.org>, "Cédric Le Goater" <clg@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>
include/migration/misc.h | 15 ++++++++-------
hw/intc/arm_gicv3_kvm.c  |  2 +-
hw/net/virtio-net.c      |  4 ++--
hw/vfio/cpr-legacy.c     |  2 +-
hw/vfio/cpr.c            |  8 ++++----
hw/vfio/migration.c      |  4 ++--
migration/cpr-exec.c     |  6 +++---
migration/migration.c    | 30 +++++++++++++++++++++---------
net/vhost-vdpa.c         |  4 ++--
ui/spice-core.c          |  7 ++++---
migration/trace-events   |  1 +
11 files changed, 49 insertions(+), 34 deletions(-)
[PATCH 0/5] migration: Notifier fixes for 11.0
Posted by Peter Xu 2 days, 9 hours ago
CI: https://gitlab.com/peterx/qemu/-/pipelines/2280356561

Two major goals for this small series:

- Fix postcopy issue where DONE and FAILED notifiers will be invoked twice

- Move FAILED notifier to be before vm_start() if the failure happens
  during switchover (where we will stop the VM first)

The 2nd goal will be needed by Stefan's ongoing work on block persistent
reservations, where a fallback should be required on src to happen before
vm_start().  Instead of introducing another FAILED_BEFORE_START, this
patchset should make FAILED work instead.

Patch 1 adds a tracepoint for me to verify this fix.

Patch 2-3 are the real changes of above two.

Patch 3-4 are some cleanups alone the context that we can do, hence
attached at the end.

More details in commit logs individually.  Comments welcomed, thanks.

Peter Xu (5):
  migration: Add a tracepoint for invoking migration notifiers
  migration: Fix double notification of DONE/FAIL for postcopy
  migration: Notify migration FAILED before starting VM
  migration: Drop explicit block activation in postcopy fail path
  migration: Rename MIG_EVENT_PRECOPY_* to MIG_EVENT_*

 include/migration/misc.h | 15 ++++++++-------
 hw/intc/arm_gicv3_kvm.c  |  2 +-
 hw/net/virtio-net.c      |  4 ++--
 hw/vfio/cpr-legacy.c     |  2 +-
 hw/vfio/cpr.c            |  8 ++++----
 hw/vfio/migration.c      |  4 ++--
 migration/cpr-exec.c     |  6 +++---
 migration/migration.c    | 30 +++++++++++++++++++++---------
 net/vhost-vdpa.c         |  4 ++--
 ui/spice-core.c          |  7 ++++---
 migration/trace-events   |  1 +
 11 files changed, 49 insertions(+), 34 deletions(-)

-- 
2.50.1