aboutgitcodebugslistschat
path: root/vhost_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'vhost_user.c')
-rw-r--r--vhost_user.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vhost_user.c b/vhost_user.c
index 256c8ab..7ab1377 100644
--- a/vhost_user.c
+++ b/vhost_user.c
@@ -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);
+ }
}