Tap and vhost devices can be preserved during cpr-transfer using traditional live migration methods, wherein the management layer creates new interfaces for the target and fiddles with 'ip link' to deactivate the old interface and activate the new.
However, CPR can simply send the file descriptors to new QEMU, with no special management actions required. The user enables this behavior by specifing '-netdev tap,cpr=on'. The default is cpr=off. Signed-off-by: Ben Chaney <[email protected]> --- Changes in v4: - change the name of cpr_get_fd_param as it is no longer used exclusively during cpr transfer - clarify documentation - Do not require fd=-1 if fds will be provided by cpr - Do not interleave tap and vhost fds - Do not check cpr state in qio_channel_handle_fds - Link to v3: https://lore.kernel.org/qemu-devel/[email protected] --- Ben Chaney (2): tap: cpr support tap: cpr fixes Steve Sistare (6): migration: stop vm earlier for cpr migration: cpr setup notifier vhost: reset vhost devices for cpr cpr: delete all fds tap: common return label tap: postload fix for cpr hw/net/virtio-net.c | 26 +++++++ hw/vfio/device.c | 2 +- hw/virtio/vhost-backend.c | 6 ++ hw/virtio/vhost.c | 32 +++++++++ include/hw/virtio/vhost-backend.h | 1 + include/hw/virtio/vhost.h | 1 + include/migration/cpr.h | 5 +- include/net/tap.h | 1 + migration/cpr.c | 32 ++++++--- migration/migration.c | 69 ++++++++++++++---- net/tap-win32.c | 5 ++ net/tap.c | 148 +++++++++++++++++++++++++++++--------- qapi/net.json | 6 +- stubs/cpr.c | 8 +++ stubs/meson.build | 1 + 15 files changed, 283 insertions(+), 60 deletions(-) --- base-commit: 2339d0a1cfac6ecc667e6e062a593865c1541c35 change-id: 20251203-cpr-tap-04fd811ace03 Best regards, -- Ben Chaney <[email protected]>
