aboutgitcodebugslistschat
path: root/passt.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2024-12-19 12:13:59 +0100
committerStefano Brivio <sbrivio@redhat.com>2025-01-20 19:51:24 +0100
commit31d70024beda1e49131d7b68dd7554bee16c79f3 (patch)
treed6648be39b0b3d78504ca8472caa6aae841b79a5 /passt.c
parent878e16345461eb2745c761f6929fd6e9da0df447 (diff)
downloadpasst-31d70024beda1e49131d7b68dd7554bee16c79f3.tar
passt-31d70024beda1e49131d7b68dd7554bee16c79f3.tar.gz
passt-31d70024beda1e49131d7b68dd7554bee16c79f3.tar.bz2
passt-31d70024beda1e49131d7b68dd7554bee16c79f3.tar.lz
passt-31d70024beda1e49131d7b68dd7554bee16c79f3.tar.xz
passt-31d70024beda1e49131d7b68dd7554bee16c79f3.tar.zst
passt-31d70024beda1e49131d7b68dd7554bee16c79f3.zip
vhost-user: add VHOST_USER_SET_DEVICE_STATE_FD command
Set the file descriptor to use to transfer the backend device state during migration. Signed-off-by: Laurent Vivier <lvivier@redhat.com> [sbrivio: Fixed nits and coding style here and there] Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'passt.c')
-rw-r--r--passt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/passt.c b/passt.c
index 1a0c404..b1c8ab6 100644
--- a/passt.c
+++ b/passt.c
@@ -75,6 +75,7 @@ char *epoll_type_str[] = {
[EPOLL_TYPE_TAP_LISTEN] = "listening qemu socket",
[EPOLL_TYPE_VHOST_CMD] = "vhost-user command socket",
[EPOLL_TYPE_VHOST_KICK] = "vhost-user kick socket",
+ [EPOLL_TYPE_VHOST_MIGRATION] = "vhost-user migration socket",
};
static_assert(ARRAY_SIZE(epoll_type_str) == EPOLL_NUM_TYPES,
"epoll_type_str[] doesn't match enum epoll_type");
@@ -356,6 +357,9 @@ loop:
case EPOLL_TYPE_VHOST_KICK:
vu_kick_cb(c.vdev, ref, &now);
break;
+ case EPOLL_TYPE_VHOST_MIGRATION:
+ vu_migrate(c.vdev, eventmask);
+ break;
default:
/* Can't happen */
ASSERT(0);