From 31d70024beda1e49131d7b68dd7554bee16c79f3 Mon Sep 17 00:00:00 2001 From: Laurent Vivier Date: Thu, 19 Dec 2024 12:13:59 +0100 Subject: 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 [sbrivio: Fixed nits and coding style here and there] Signed-off-by: Stefano Brivio --- passt.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'passt.c') 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); -- cgit v1.2.3