vmsilo fork of vhost rust libraries
Find a file
Alyssa Ross 34b75fdae5 vhost_user: don't take ownership of Listener
The vhost-device devices all call VhostUserDaemon::serve in a loop, to
handle reconnections.  This is not ideal, because a new listener is
created each loop iteration, which means that each time, the old
socket is unlinked and a new one is created.  This means that there's
a potential race where a frontend attempts to connect to the backend
before the new socket is created.

A more robust way to achieve this would be to have the devices create
their own listeners, and pass the same one to VhostUserDaemon::start
on each loop iteration, instead of letting VhostUserDaemon::serve
create it repeatedly.  This was not previously possible though,
because VhostUserDaemon::start consumed the listener, even though it
didn't need to.

Because it's now possible to call VhostUserDaemon::start multiple
times with the same socket, I've removed the TODO about handling
reconnection.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
2025-09-10 09:09:29 +02:00
.buildkite Remove gpu-socket feature 2024-10-25 10:06:09 +02:00
.cargo cargo-config: rename to config.toml 2024-10-02 13:43:29 +02:00
.github dependabot: enable update grouping 2023-11-14 15:04:11 +01:00
rust-vmm-ci@fc4584d8b8 build(deps): bump rust-vmm-ci from 0b1cb86 to fc4584d 2025-09-02 13:10:28 +02:00
vhost vhost_user: don't take ownership of Listener 2025-09-10 09:09:29 +02:00
vhost-user-backend vhost_user: don't take ownership of Listener 2025-09-10 09:09:29 +02:00
.gitignore Update .gitignore file 2021-03-01 12:50:56 +01:00
.gitmodules Switch to rust-vmm-ci for the CI 2020-09-04 17:59:53 +03:00
Cargo.toml chore: update the vmm-sys-util version 2025-08-27 10:18:07 +02:00
CODEOWNERS CODEOWNERS: add myself as reviewer 2025-07-24 13:09:49 +02:00
coverage_config_aarch64.json vhost: Adopt new backend naming 2023-09-13 13:00:10 +02:00
coverage_config_x86_64.json build(deps): bump rust-vmm-ci from 209c04e to 1150c47 2024-10-25 14:18:16 +02:00
LICENSE Initial commit 2019-04-03 14:38:29 +08:00
LICENSE-BSD-3-Clause Refine BSD-3-Clause license file 2021-11-26 21:19:40 +08:00
README.md vhost: Add README for the workspace 2022-10-11 12:28:33 +05:30

vhost

The vhost workspace hosts libraries related to the vhost and vhost-user protocols. It currently consists of the following crates:

  • vhost -> A pure rust library for vDPA, vhost and vhost-user.
  • vhost-user-backend -> It provides a framework to implement vhost-user backend services.