From 4c0784f041f6e1e4c50f4cccdc3002689b6a0a5a Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 1 May 2024 09:35:15 +0100 Subject: [PATCH] build: Bump vhost-user-backend, vhost, and virtio-queue Update the vhost-user-backend crate version used along with related crates (vhost and virtio-queue.) This requires minor changes to the types used for the memory in the backends with the use of the BitmapMmapRegion type for the Bitmap implementation. Signed-off-by: Rob Bradford (cherry picked from commit d10f20eb718023742143fa847a37f3d6114ead52) --- Cargo.lock | 12 ++++++------ block/Cargo.toml | 2 +- fuzz/Cargo.toml | 2 +- net_util/Cargo.toml | 2 +- vhost_user_block/Cargo.toml | 6 +++--- vhost_user_block/src/lib.rs | 10 ++++++---- vhost_user_net/Cargo.toml | 4 ++-- vhost_user_net/src/lib.rs | 7 ++++--- virtio-devices/Cargo.toml | 4 ++-- vm-virtio/Cargo.toml | 2 +- vmm/Cargo.toml | 2 +- 11 files changed, 28 insertions(+), 25 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5aa880105..2db20c816 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2377,9 +2377,9 @@ dependencies = [ [[package]] name = "vhost" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b64e816d0d49769fbfaa1494eb77cc2a3ddc526ead05c7f922cb7d64106286f" +checksum = "6be08d1166d41a78861ad50212ab3f9eca0729c349ac3a7a8f557c62406b87cc" dependencies = [ "bitflags 2.4.1", "libc", @@ -2389,9 +2389,9 @@ dependencies = [ [[package]] name = "vhost-user-backend" -version = "0.13.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72c8c447d076ac508d78cb45664d203df7989e891656dce260a7e93d72352c9a" +checksum = "1f0ffb1dd8e00a708a0e2c32d5efec5812953819888591fff9ff68236b8a5096" dependencies = [ "libc", "log", @@ -2481,9 +2481,9 @@ dependencies = [ [[package]] name = "virtio-queue" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3f69a13d6610db9312acbb438b0390362af905d37634a2106be70c0f734986d" +checksum = "07d8406e7250c934462de585d8f2d2781c31819bca1fbb7c5e964ca6bbaabfe8" dependencies = [ "log", "virtio-bindings", diff --git a/block/Cargo.toml b/block/Cargo.toml index ee330fe57..3b78dd5ad 100644 --- a/block/Cargo.toml +++ b/block/Cargo.toml @@ -21,7 +21,7 @@ uuid = { version = "1.3.4", features = ["v4"] } versionize = "0.2.0" versionize_derive = "0.1.6" virtio-bindings = { version = "0.2.0", features = ["virtio-v5_0_0"] } -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-memory = { version = "0.14.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } vm-virtio = { path = "../vm-virtio" } vmm-sys-util = "0.12.1" diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index c7931670c..4e457eada 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -23,7 +23,7 @@ net_util = { path = "../net_util" } once_cell = "1.19.0" seccompiler = "0.4.0" virtio-devices = { path = "../virtio-devices" } -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vmm = { path = "../vmm" } vmm-sys-util = "0.12.1" vm-memory = "0.14.0" diff --git a/net_util/Cargo.toml b/net_util/Cargo.toml index dcdf40d03..d67faf223 100644 --- a/net_util/Cargo.toml +++ b/net_util/Cargo.toml @@ -16,7 +16,7 @@ thiserror = "1.0.52" versionize = "0.2.0" versionize_derive = "0.1.6" virtio-bindings = "0.2.0" -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-memory = { version = "0.14.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } vm-virtio = { path = "../vm-virtio" } vmm-sys-util = "0.12.1" diff --git a/vhost_user_block/Cargo.toml b/vhost_user_block/Cargo.toml index 89fdb506e..8e1a2641f 100644 --- a/vhost_user_block/Cargo.toml +++ b/vhost_user_block/Cargo.toml @@ -13,9 +13,9 @@ epoll = "4.3.3" libc = "0.2.147" log = "0.4.20" option_parser = { path = "../option_parser" } -vhost = { version = "0.10.0", features = ["vhost-user-backend"] } -vhost-user-backend = "0.13.1" +vhost = { version = "0.11.0", features = ["vhost-user-backend"] } +vhost-user-backend = "0.15.0" virtio-bindings = "0.2.0" -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-memory = "0.14.0" vmm-sys-util = "0.12.1" diff --git a/vhost_user_block/src/lib.rs b/vhost_user_block/src/lib.rs index 2adef9405..56fbe7adb 100644 --- a/vhost_user_block/src/lib.rs +++ b/vhost_user_block/src/lib.rs @@ -33,16 +33,18 @@ use std::vec::Vec; use std::{convert, error, fmt, io}; use vhost::vhost_user::message::*; use vhost::vhost_user::Listener; -use vhost_user_backend::{VhostUserBackendMut, VhostUserDaemon, VringRwLock, VringState, VringT}; +use vhost_user_backend::{ + bitmap::BitmapMmapRegion, VhostUserBackendMut, VhostUserDaemon, VringRwLock, VringState, VringT, +}; use virtio_bindings::virtio_blk::*; use virtio_bindings::virtio_config::VIRTIO_F_VERSION_1; use virtio_bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX; use virtio_queue::QueueT; use vm_memory::GuestAddressSpace; -use vm_memory::{bitmap::AtomicBitmap, ByteValued, Bytes, GuestMemoryAtomic}; +use vm_memory::{ByteValued, Bytes, GuestMemoryAtomic}; use vmm_sys_util::{epoll::EventSet, eventfd::EventFd}; -type GuestMemoryMmap = vm_memory::GuestMemoryMmap; +type GuestMemoryMmap = vm_memory::GuestMemoryMmap; const SECTOR_SHIFT: u8 = 9; const SECTOR_SIZE: u64 = 0x01 << SECTOR_SHIFT; @@ -301,7 +303,7 @@ impl VhostUserBlkBackend { } impl VhostUserBackendMut for VhostUserBlkBackend { - type Bitmap = AtomicBitmap; + type Bitmap = BitmapMmapRegion; type Vring = VringRwLock>; fn num_queues(&self) -> usize { diff --git a/vhost_user_net/Cargo.toml b/vhost_user_net/Cargo.toml index 9e216d08f..38667f554 100644 --- a/vhost_user_net/Cargo.toml +++ b/vhost_user_net/Cargo.toml @@ -13,8 +13,8 @@ libc = "0.2.147" log = "0.4.20" net_util = { path = "../net_util" } option_parser = { path = "../option_parser" } -vhost = { version = "0.10.0", features = ["vhost-user-backend"] } -vhost-user-backend = "0.13.1" +vhost = { version = "0.11.0", features = ["vhost-user-backend"] } +vhost-user-backend = "0.15.0" virtio-bindings = "0.2.0" vm-memory = "0.14.0" vmm-sys-util = "0.12.1" diff --git a/vhost_user_net/src/lib.rs b/vhost_user_net/src/lib.rs index cd4188460..78bae3337 100644 --- a/vhost_user_net/src/lib.rs +++ b/vhost_user_net/src/lib.rs @@ -23,14 +23,15 @@ use std::sync::{Arc, Mutex, RwLock}; use std::vec::Vec; use vhost::vhost_user::message::*; use vhost::vhost_user::Listener; +use vhost_user_backend::bitmap::BitmapMmapRegion; use vhost_user_backend::{VhostUserBackendMut, VhostUserDaemon, VringRwLock, VringT}; use virtio_bindings::virtio_config::{VIRTIO_F_NOTIFY_ON_EMPTY, VIRTIO_F_VERSION_1}; use virtio_bindings::virtio_net::*; use vm_memory::GuestAddressSpace; -use vm_memory::{bitmap::AtomicBitmap, GuestMemoryAtomic}; +use vm_memory::GuestMemoryAtomic; use vmm_sys_util::{epoll::EventSet, eventfd::EventFd}; -type GuestMemoryMmap = vm_memory::GuestMemoryMmap; +type GuestMemoryMmap = vm_memory::GuestMemoryMmap; pub type Result = std::result::Result; type VhostUserBackendResult = std::result::Result; @@ -159,7 +160,7 @@ impl VhostUserNetBackend { } impl VhostUserBackendMut for VhostUserNetBackend { - type Bitmap = AtomicBitmap; + type Bitmap = BitmapMmapRegion; type Vring = VringRwLock>; fn num_queues(&self) -> usize { diff --git a/virtio-devices/Cargo.toml b/virtio-devices/Cargo.toml index 8e1f32583..3306d338f 100644 --- a/virtio-devices/Cargo.toml +++ b/virtio-devices/Cargo.toml @@ -27,9 +27,9 @@ serial_buffer = { path = "../serial_buffer" } thiserror = "1.0.52" versionize = "0.2.0" versionize_derive = "0.1.6" -vhost = { version = "0.10.0", features = ["vhost-user-frontend", "vhost-user-backend", "vhost-kern", "vhost-vdpa"] } +vhost = { version = "0.11.0", features = ["vhost-user-frontend", "vhost-user-backend", "vhost-kern", "vhost-vdpa"] } virtio-bindings = { version = "0.2.0", features = ["virtio-v5_0_0"] } -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-allocator = { path = "../vm-allocator" } vm-device = { path = "../vm-device" } vm-memory = { version = "0.14.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } diff --git a/vm-virtio/Cargo.toml b/vm-virtio/Cargo.toml index 1b279d34b..47748cc1c 100644 --- a/vm-virtio/Cargo.toml +++ b/vm-virtio/Cargo.toml @@ -9,5 +9,5 @@ default = [] [dependencies] log = "0.4.20" -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-memory = { version = "0.14.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } diff --git a/vmm/Cargo.toml b/vmm/Cargo.toml index 42e9737a6..977e68983 100644 --- a/vmm/Cargo.toml +++ b/vmm/Cargo.toml @@ -60,7 +60,7 @@ versionize_derive = "0.1.6" vfio-ioctls = { git = "https://github.com/rust-vmm/vfio", branch = "main", default-features = false } vfio_user = { git = "https://github.com/rust-vmm/vfio-user", branch = "main" } virtio-devices = { path = "../virtio-devices" } -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-allocator = { path = "../vm-allocator" } vm-device = { path = "../vm-device" } vm-memory = { version = "0.14.0", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] }