From 1d39cf5cbb764953ab524c01d8acd20ca822a7f5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Nov 2025 15:27:14 +0000 Subject: [PATCH] build(deps): bump the vhost group across 1 directory with 2 updates Updates the requirements on [virtio-queue](https://github.com/rust-vmm/vm-virtio) and [vm-memory](https://github.com/rust-vmm/vm-memory) to permit the latest version. Updates `virtio-queue` to 0.17.0 - [Release notes](https://github.com/rust-vmm/vm-virtio/releases) - [Commits](https://github.com/rust-vmm/vm-virtio/compare/virtio-queue-v0.16.0...virtio-queue-v0.17.0) Updates `vm-memory` to 0.17.1 - [Release notes](https://github.com/rust-vmm/vm-memory/releases) - [Changelog](https://github.com/rust-vmm/vm-memory/blob/main/CHANGELOG.md) - [Commits](https://github.com/rust-vmm/vm-memory/compare/v0.16.2...v0.17.1) --- updated-dependencies: - dependency-name: virtio-queue dependency-version: 0.17.0 dependency-type: direct:production dependency-group: vhost - dependency-name: vm-memory dependency-version: 0.17.1 dependency-type: direct:production dependency-group: vhost ... Signed-off-by: dependabot[bot] [SG: adapted code to vm-memory changes, mainly related to changes on return types (e.g. Option vs Result, etc.)] Signed-off-by: Stefano Garzarella --- Cargo.toml | 4 ++-- vhost-user-backend/src/handler.rs | 8 ++++++-- vhost/src/vhost_user/message.rs | 7 ++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 26aa156..5dba6e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,6 @@ members = [ [workspace.dependencies] virtio-bindings = "0.2.6" -virtio-queue = "0.16.0" -vm-memory = "0.16.2" +virtio-queue = "0.17.0" +vm-memory = "0.17.1" vmm-sys-util = "0.15.0" diff --git a/vhost-user-backend/src/handler.rs b/vhost-user-backend/src/handler.rs index 3300875..685ab67 100644 --- a/vhost-user-backend/src/handler.rs +++ b/vhost-user-backend/src/handler.rs @@ -318,7 +318,9 @@ where region.mmap_region(file)?, GuestAddress(region.guest_phys_addr), ) - .map_err(|e| VhostUserError::ReqHandlerError(io::Error::other(e)))?; + .ok_or(VhostUserError::ReqHandlerError( + io::ErrorKind::InvalidInput.into(), + ))?; mappings.push(AddrMapping { #[cfg(feature = "postcopy")] local_addr: guest_region.as_ptr() as u64, @@ -606,7 +608,9 @@ where region.mmap_region(file)?, GuestAddress(region.guest_phys_addr), ) - .map_err(|e| VhostUserError::ReqHandlerError(io::Error::other(e)))?, + .ok_or(VhostUserError::ReqHandlerError( + io::ErrorKind::InvalidInput.into(), + ))?, ); let addr_mapping = AddrMapping { diff --git a/vhost/src/vhost_user/message.rs b/vhost/src/vhost_user/message.rs index 7fd93ce..eef2c67 100644 --- a/vhost/src/vhost_user/message.rs +++ b/vhost/src/vhost_user/message.rs @@ -17,7 +17,7 @@ use std::ops::Deref; use uuid::Uuid; -use vm_memory::{mmap::NewBitmap, ByteValued, Error as MmapError, FileOffset, MmapRegion}; +use vm_memory::{mmap::NewBitmap, ByteValued, FileOffset, MmapRegion}; #[cfg(feature = "xen")] use vm_memory::{GuestAddress, MmapRange, MmapXenFlags}; @@ -550,7 +550,6 @@ impl VhostUserMemoryRegion { FileOffset::new(file, self.mmap_offset), self.memory_size as usize, ) - .map_err(MmapError::MmapRegion) .map_err(|e| Error::ReqHandlerError(io::Error::other(e))) } @@ -590,9 +589,7 @@ impl VhostUserMemoryRegion { self.xen_mmap_data, ); - MmapRegion::::from_range(range) - .map_err(MmapError::MmapRegion) - .map_err(|e| Error::ReqHandlerError(io::Error::other(e))) + MmapRegion::::from_range(range).map_err(|e| Error::ReqHandlerError(io::Error::other(e))) } fn is_valid(&self) -> bool {