Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
6b13b83
build(deps): bump rust-vmm-ci from `09aef99` to `2d733b0`
dependabot[bot] Feb 24, 2025
425a3c0
build(deps): bump rust-vmm-ci from `2d733b0` to `8ae03e5`
dependabot[bot] Mar 10, 2025
d539be9
vhost: fix clippy warnings on Rust 1.85
stefano-garzarella Mar 25, 2025
1e444b5
build(deps): bump rust-vmm-ci from `8ae03e5` to `c3ef897`
dependabot[bot] Mar 25, 2025
c0f8a9f
vhost_user: format links in docs correctly
alyssais Mar 27, 2025
cd05ac5
vhost: fix markdown formatting of docs heading
alyssais Mar 27, 2025
888165b
set_log_base: use MmapRegion::bitmap() directly
bonzini May 21, 2025
1e1ec87
build: bump vmm-sys-util to 0.14.0
May 30, 2025
8c7cc59
build(deps): update nix requirement
dependabot[bot] Jun 3, 2025
14db3cd
vhost_user: fix replies without GET_PROTOCOL_FEATURES
alyssais Mar 27, 2025
31d323e
vhost: Prepare v0.14.0 release
Jun 3, 2025
9c8dc0b
vhost-user-backend: prepare v0.18.0 release
Jun 3, 2025
77aed74
build(deps): bump rust-vmm-ci from `c3ef897` to `aa2f8a9`
dependabot[bot] Jun 9, 2025
ad7268f
build: Update virtio-queue and virtio-bindings
jinankjain Jun 11, 2025
49afe46
vhost-user-backend: Prepare for new release v0.19.0
jinankjain Jun 11, 2025
9a744c2
vhost: Fix clippy warning from nightly compiler
jinankjain Jun 12, 2025
03ba6ea
vhost: correct 'trucate' to 'truncate'
wongnelson Jun 16, 2025
f9b25c2
vhost: Fix building docs
kleinweby Jun 25, 2025
82e09ed
vhost: Fix broken link in vhost/README.md
chenhengqi Jun 26, 2025
3db761b
build: Update virtio-queue and virtio-bindings
jinankjain Jun 27, 2025
eae4f73
vhost-user-backend: Prepare for new release v0.20.0
jinankjain Jun 27, 2025
55f5b29
build(deps): bump rust-vmm-ci from `aa2f8a9` to `af54708`
dependabot[bot] Jul 14, 2025
92b9df3
chore: fix new clippy warnings
stefano-garzarella Jul 17, 2025
fce6393
CODEOWNERS: add myself as reviewer
epilys Jul 24, 2025
c2dafc7
vhost: impl From<UnixListener> for Listener
alyssais Jul 30, 2025
cfff91e
build(deps): bump rust-vmm-ci from `af54708` to `0b1cb86`
dependabot[bot] Aug 12, 2025
580f19f
Fix "mismatched lifetime syntaxes" warning
germag Aug 20, 2025
e869735
chore: update the vmm-sys-util version
uran0sH Jul 9, 2025
18bf2a5
Replace Eventfd with EventNotifier/EventConsumer
uran0sH Jul 6, 2025
266854e
build(deps): update userfaultfd requirement
dependabot[bot] Aug 27, 2025
6a559e2
build(deps): bump rust-vmm-ci from `0b1cb86` to `fc4584d`
dependabot[bot] Sep 2, 2025
e20a5a5
vhost_user: fix mismatched lifetime warning
alyssais Sep 9, 2025
34b75fd
vhost_user: don't take ownership of Listener
alyssais Sep 9, 2025
5468828
build(deps): bump rust-vmm-ci from `fc4584d` to `c0f5d4c`
dependabot[bot] Sep 30, 2025
122ad32
build(deps): bump rust-vmm-ci from `c0f5d4c` to `3e24835`
dependabot[bot] Oct 6, 2025
5d57b5d
chore: update rust-vmm-ci
roypat Oct 18, 2025
93b2773
vhost: fix undefined behavior in get_vring_base()
roypat Oct 1, 2025
2cc12f6
vhost: fix unused function warnings on some feature combos
roypat Oct 2, 2025
cf91d1d
configure cargo-all-features
roypat Oct 1, 2025
b222aac
revert to using normal rust-vmm-ci tests
roypat Oct 1, 2025
f979631
fix cargo doc CI step
roypat Oct 1, 2025
6283571
fix documentation build on docs.rs
roypat Oct 2, 2025
024213c
build(deps): bump rust-vmm-ci from `1b48931` to `b4bb768`
dependabot[bot] Nov 3, 2025
1d39cf5
build(deps): bump the vhost group across 1 directory with 2 updates
dependabot[bot] Nov 17, 2025
d2caea1
vhost: Prepare v0.15.0 release
ShadowCurse Nov 18, 2025
52b8d40
vhost-user: prepare v0.21.0 release
ShadowCurse Nov 18, 2025
192551a
build(deps): bump rust-vmm-ci from `b4bb768` to `e34c504`
dependabot[bot] Nov 24, 2025
903cabf
backend_req::tests: Extract test setup to a function
mtjhrc Aug 28, 2024
fa88043
vhost_user: Add support for SHMEM_MAP/UNMAP backend requests
aesteve-rh May 21, 2024
5338573
Add tests for default impls of Frontend req handlers
mtjhrc Aug 28, 2024
c686ebb
Bump test coverage value for x86_64
mtjhrc Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .buildkite/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions .buildkite/custom-tests.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
{
"tests": [
{
"test_name": "build-vhost-kern",
"command": "cargo build --features=vhost-kern",
"platform": [
"x86_64"
]
},
{
"test_name": "build-vhost-user-frontend",
"command": "cargo build --features=vhost-user-frontend",
"platform": [
"x86_64"
]
},
{
"test_name": "build-vhost-user-backend",
"command": "cargo build --features=vhost-user-backend",
"platform": [
"x86_64"
]
}
]
}
112 changes: 0 additions & 112 deletions .buildkite/rust-vmm-ci-tests.json

This file was deleted.

1 change: 1 addition & 0 deletions .buildkite/rust-vmm-ci-tests.json
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Add the list of code owners here (using their GitHub username)
* @Ablu @eryugey @germag @jiangliu @sboeuf @slp @stefano-garzarella
* @Ablu @epilys @eryugey @germag @jiangliu @sboeuf @slp @stefano-garzarella
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ members = [
]

[workspace.dependencies]
virtio-bindings = "0.2.1"
virtio-queue = "0.14.0"
vm-memory = "0.16.0"
vmm-sys-util = "0.12.1"
virtio-bindings = "0.2.6"
virtio-queue = "0.17.0"
vm-memory = "0.17.1"
vmm-sys-util = "0.15.0"
2 changes: 1 addition & 1 deletion coverage_config_x86_64.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"coverage_score": 86.24,
"coverage_score": 86.22,
"exclude_path": "vhost/src/vhost_kern/",
"crate_features": "vhost/vhost-user-frontend,vhost/vhost-user-backend,vhost-user-backend/postcopy"
}
28 changes: 25 additions & 3 deletions vhost-user-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,36 @@
# Changelog

## [Unreleased]

### Added
- [[#268]](https://github.com/rust-vmm/vhost/pull/268) Add support for `VHOST_USER_GET_SHARED_OBJECT`
### Changed
### Deprecated
### Fixed

## v0.21.0

### Changed
- [[#308]](https://github.com/rust-vmm/vhost/pull/308) Replace Eventfd with EventNotifier/EventConsumer.
- [[#321]](https://github.com/rust-vmm/vhost/pull/321) Don't take ownership of listener in `VhostUserDaemon::start`.
- [[#333]](https://github.com/rust-vmm/vhost/pull/333) Updated virtio-queue to 0.17.0, vm-memory to 0.17.1, vmm-sys-util to 0.15.0 and vhost to 0.15.0

### Deprecated
## v0.20.0

### Fixed
### Changed
- [[306]](https://github.com/rust-vmm/vhost/pull/306) Updated virtio-queue to v0.16.0 and virtio-bindings to v0.2.6

## v0.19.0

### Changed
- [[299]](https://github.com/rust-vmm/vhost/pull/299) Updated virtio-queue to v0.15.0 and virtio-bindings to v0.2.5

## v0.18.0

### Added
- [[#268]](https://github.com/rust-vmm/vhost/pull/268) Add support for `VHOST_USER_GET_SHARED_OBJECT`

### Changed
- [[#295]](https://github.com/rust-vmm/vhost/pull/295) Updated vm-memory to 0.16.2 and vmm-sys-util to 0.14.0

## v0.17.0

Expand Down
22 changes: 17 additions & 5 deletions vhost-user-backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,42 @@
[package]
name = "vhost-user-backend"
version = "0.17.0"
version = "0.21.0"
authors = ["The Cloud Hypervisor Authors"]
keywords = ["vhost-user", "virtio"]
description = "A framework to build vhost-user backend service daemon"
repository = "https://github.com/rust-vmm/vhost"
edition = "2021"
license = "Apache-2.0"

[package.metadata.docs.rs]
all-features = true
rustc-args = ['--cfg RUSTDOC_disable_feature_compat_errors']

[features]
xen = ["vm-memory/xen", "vhost/xen"]
postcopy = ["vhost/postcopy", "userfaultfd"]

[dependencies]
libc = "0.2.39"
log = "0.4.17"
userfaultfd = { version = "0.8.1", optional = true }
vhost = { path = "../vhost", version = "0.13.0", features = ["vhost-user-backend"] }
userfaultfd = { version = "0.9.0", optional = true }
vhost = { path = "../vhost", version = "0.15.0", features = ["vhost-user-backend"] }
virtio-bindings = { workspace = true }
virtio-queue = { workspace = true }
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic", "backend-bitmap"] }
vmm-sys-util = { workspace = true }

[dev-dependencies]
nix = { version = "0.29", features = ["fs"] }
nix = { version = "0.30", features = ["fs"] }
uuid = { version = "1.8.0", features=["v4"] }
vhost = { path = "../vhost", version = "0.13.0", features = ["test-utils", "vhost-user-frontend", "vhost-user-backend"] }
vhost = { path = "../vhost", version = "0.15.0", features = ["test-utils", "vhost-user-frontend", "vhost-user-backend"] }
vm-memory = { workspace = true, features = ["backend-mmap", "backend-atomic"] }
tempfile = "3.2.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(RUSTDOC_disable_feature_compat_errors)'] }

[package.metadata.cargo-all-features]
skip_feature_sets = [
["xen", "postcopy"]
]
37 changes: 21 additions & 16 deletions vhost-user-backend/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use vhost::vhost_user::message::{
use vhost::vhost_user::Backend;
use vm_memory::bitmap::Bitmap;
use vmm_sys_util::epoll::EventSet;
use vmm_sys_util::eventfd::EventFd;
use vmm_sys_util::event::{EventConsumer, EventNotifier};

use vhost::vhost_user::GpuBackend;

Expand Down Expand Up @@ -132,7 +132,8 @@ pub trait VhostUserBackend: Send + Sync {
///
/// The returned `EventFd` will be monitored for IO events. When the
/// returned EventFd is written to, the worker thread will exit.
fn exit_event(&self, _thread_index: usize) -> Option<EventFd> {
// TODO: Refine this API to return only EventNotifier.
fn exit_event(&self, _thread_index: usize) -> Option<(EventConsumer, EventNotifier)> {
None
}

Expand Down Expand Up @@ -275,7 +276,8 @@ pub trait VhostUserBackendMut: Send + Sync {
/// If an (`EventFd`, `token`) pair is returned, the returned `EventFd` will be monitored for IO
/// events by using epoll with the specified `token`. When the returned EventFd is written to,
/// the worker thread will exit.
fn exit_event(&self, _thread_index: usize) -> Option<EventFd> {
// TODO: Refine this API to return only EventNotifier.
fn exit_event(&self, _thread_index: usize) -> Option<(EventConsumer, EventNotifier)> {
None
}

Expand Down Expand Up @@ -382,7 +384,7 @@ impl<T: VhostUserBackend> VhostUserBackend for Arc<T> {
self.deref().queues_per_thread()
}

fn exit_event(&self, thread_index: usize) -> Option<EventFd> {
fn exit_event(&self, thread_index: usize) -> Option<(EventConsumer, EventNotifier)> {
self.deref().exit_event(thread_index)
}

Expand Down Expand Up @@ -471,7 +473,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for Mutex<T> {
self.lock().unwrap().queues_per_thread()
}

fn exit_event(&self, thread_index: usize) -> Option<EventFd> {
fn exit_event(&self, thread_index: usize) -> Option<(EventConsumer, EventNotifier)> {
self.lock().unwrap().exit_event(thread_index)
}

Expand Down Expand Up @@ -563,7 +565,7 @@ impl<T: VhostUserBackendMut> VhostUserBackend for RwLock<T> {
self.read().unwrap().queues_per_thread()
}

fn exit_event(&self, thread_index: usize) -> Option<EventFd> {
fn exit_event(&self, thread_index: usize) -> Option<(EventConsumer, EventNotifier)> {
self.read().unwrap().exit_event(thread_index)
}

Expand Down Expand Up @@ -599,16 +601,16 @@ impl<T: VhostUserBackendMut> VhostUserBackend for RwLock<T> {
pub mod tests {
use super::*;
use crate::VringRwLock;
use libc::EFD_NONBLOCK;
use std::sync::Mutex;
use uuid::Uuid;
use vm_memory::{GuestAddress, GuestMemoryAtomic, GuestMemoryMmap};
use vmm_sys_util::event::{new_event_consumer_and_notifier, EventFlag};

pub struct MockVhostBackend {
events: u64,
event_idx: bool,
acked_features: u64,
exit_event_fds: Vec<EventFd>,
exit_event_fds: Vec<(EventConsumer, EventNotifier)>,
}

impl MockVhostBackend {
Expand All @@ -624,7 +626,10 @@ pub mod tests {
// order to allow tests maximum flexibility in checking whether
// signals arrived or not.
backend.exit_event_fds = (0..backend.queues_per_thread().len())
.map(|_| EventFd::new(EFD_NONBLOCK).unwrap())
.map(|_| {
new_event_consumer_and_notifier(EventFlag::NONBLOCK)
.expect("Failed to new EventNotifier and EventConsumer")
})
.collect();

backend
Expand Down Expand Up @@ -695,13 +700,13 @@ pub mod tests {
vec![1, 1]
}

fn exit_event(&self, thread_index: usize) -> Option<EventFd> {
Some(
self.exit_event_fds
.get(thread_index)?
.try_clone()
.expect("Could not clone exit eventfd"),
)
fn exit_event(&self, thread_index: usize) -> Option<(EventConsumer, EventNotifier)> {
self.exit_event_fds.get(thread_index).map(|(s, r)| {
(
s.try_clone().expect("Failed to clone EventConsumer"),
r.try_clone().expect("Failed to clone EventNotifier"),
)
})
}

fn handle_event(
Expand Down
2 changes: 1 addition & 1 deletion vhost-user-backend/src/bitmap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Bitmap for BitmapMmapRegion {
.is_some_and(|bitmap| bitmap.dirty_at(self.base_address.saturating_add(offset)))
}

fn slice_at(&self, offset: usize) -> <Self as WithBitmapSlice>::S {
fn slice_at(&self, offset: usize) -> <Self as WithBitmapSlice<'_>>::S {
Self {
inner: Arc::clone(&self.inner),
base_address: self.base_address.saturating_add(offset),
Expand Down
Loading