1
0
Fork 0
mirror of https://passt.top/passt synced 2025-06-17 04:35:35 +02:00

vhost_user: Make source quit after reporting migration state

This will close all the sockets we currently have open in repair mode,
and completes our migration tasks as source. If the hypervisor wants
to have us back at this point, somebody needs to restart us.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2025-02-12 18:07:16 +11:00
parent b899141ad5
commit f3fe795ff5

View file

@ -1203,4 +1203,11 @@ void vu_control_handler(struct vu_dev *vdev, int fd, uint32_t events)
if (reply_requested)
vu_send_reply(fd, &msg);
if (msg.hdr.request == VHOST_USER_CHECK_DEVICE_STATE &&
vdev->context->device_state_result == 0 &&
!vdev->context->migrate_target) {
info("Migration complete, exiting");
_exit(EXIT_SUCCESS);
}
}