mbox series

[for-8.0,0/3] migration: Preempt mode fixes for 8.0

Message ID 20230326172540.2571110-1-peterx@redhat.com (mailing list archive)
Headers show
Series migration: Preempt mode fixes for 8.0 | expand

Message

Peter Xu March 26, 2023, 5:25 p.m. UTC
I'm proposing this patchset for current 8.0 rc material.  If we decide to
merge this we should merge this sooner the better..  If we leave this for
next release then 8.0 release will break with preempt migrations to 7.2-
binaries, then also we need to copy stable when merged.  Currently no
stable backport needed if this can land 8.0 (I still attached Fixes for
each of them just to mark out the issue commits, though).

This patchset target to fix two issues for preempt mode (both of them
should be introduced during 8.0 dev cycle):

(1) The rare s390 crash reported by Peter Maydell and later on reproduced
    by Dave (thanks!), see <ZBoShWArKDPpX/D7@work-vm> on qemu-devel.

(2) Preempt mode migration breakage from 8.0 -> pre-7.2 binaries

The 2nd issue was what I found when testing (1), so I think (2) is even
more severe because it constantly breaks migration from new->old binaries,
depending on how much we care about that.

Patch 1 was a pre-requisite of patch 2 on enabling shutdown() to work on
TLS sockets even on the server side.  Should be something we just
overlooked when having the tls code merged but just never bother because we
never used the server side shutdowns.

Patch 2 targets to fix issue (1).  Dave, I didn't yet attach your T-b due
to the flag change.  I think it'll work the same as old, though.

Patch 3 fixes issue (2) which I checked myself along with patch 2.

Logically patch 1 is not bugfix but still a dependency and I see it low
risk to merge even during rc release cycles.  But please reviewers justify
in case for whatever reason this set is not suitable for 8.0 anymore.

Tests I've done with the whole set applied:

- qtests
- different binary tests for preempt, majorly:
  - 8.0 -> 8.0
  - 7.2 -> 8.0 (mach=pc-q35-7.2)
  - 8.0 -> 7.2 (mach=pc-q35-7.2)

Thanks,

Peter Xu (3):
  io: tls: Inherit QIO_CHANNEL_FEATURE_SHUTDOWN on server side
  migration: Fix potential race on postcopy_qemufile_src
  migration: Recover behavior of preempt channel creation for pre-7.2

 hw/core/machine.c        |  1 +
 io/channel-tls.c         |  3 +++
 migration/migration.c    | 19 +++++++++++++++++--
 migration/migration.h    | 41 +++++++++++++++++++++++++++++++++++++++-
 migration/postcopy-ram.c | 30 ++++++++++++++++++++++-------
 5 files changed, 84 insertions(+), 10 deletions(-)