diff --git a/Cargo.lock b/Cargo.lock index 620ad5cd5..2a43f62c7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2381,9 +2381,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.5.0", "libc", @@ -2393,9 +2393,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", @@ -2484,9 +2484,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 728dd6b36..f47df765c 100644 --- a/block/Cargo.toml +++ b/block/Cargo.toml @@ -20,7 +20,7 @@ smallvec = "1.13.2" thiserror = "1.0.58" uuid = { version = "1.8.0", features = ["v4"] } virtio-bindings = { version = "0.2.2", features = ["virtio-v5_0_0"] } -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-memory = { version = "0.14.1", 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 8b655221d..518c4cf77 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.1" diff --git a/net_util/Cargo.toml b/net_util/Cargo.toml index c8cb5a9e8..c6a0b13a9 100644 --- a/net_util/Cargo.toml +++ b/net_util/Cargo.toml @@ -14,7 +14,7 @@ rate_limiter = { path = "../rate_limiter" } serde = {version = "1.0.197",features = ["derive"]} thiserror = "1.0.58" virtio-bindings = "0.2.2" -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-memory = { version = "0.14.1", 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 9ff956946..5afe36659 100644 --- a/vhost_user_block/Cargo.toml +++ b/vhost_user_block/Cargo.toml @@ -13,9 +13,9 @@ epoll = "4.3.3" libc = "0.2.153" log = "0.4.21" 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.2" -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-memory = "0.14.1" vmm-sys-util = "0.12.1" diff --git a/vhost_user_block/src/lib.rs b/vhost_user_block/src/lib.rs index e4bedae0c..8f70bc678 100644 --- a/vhost_user_block/src/lib.rs +++ b/vhost_user_block/src/lib.rs @@ -32,16 +32,18 @@ use std::time::Instant; 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; @@ -300,7 +302,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 89c37ab0e..517544021 100644 --- a/vhost_user_net/Cargo.toml +++ b/vhost_user_net/Cargo.toml @@ -13,8 +13,8 @@ libc = "0.2.153" log = "0.4.21" 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.2" vm-memory = "0.14.1" vmm-sys-util = "0.12.1" diff --git a/vhost_user_net/src/lib.rs b/vhost_user_net/src/lib.rs index b9b9d9c40..26e8bce26 100644 --- a/vhost_user_net/src/lib.rs +++ b/vhost_user_net/src/lib.rs @@ -22,14 +22,15 @@ use std::process; use std::sync::{Arc, Mutex, RwLock}; 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; @@ -158,7 +159,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 48e758282..1d4f406ac 100644 --- a/virtio-devices/Cargo.toml +++ b/virtio-devices/Cargo.toml @@ -26,9 +26,9 @@ serde_json = "1.0.115" serde_with = { version = "3.7.0", default-features = false, features = ["macros"] } serial_buffer = { path = "../serial_buffer" } thiserror = "1.0.58" -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.2", 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.1", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } diff --git a/vm-virtio/Cargo.toml b/vm-virtio/Cargo.toml index af0a3ae70..b7f60c59d 100644 --- a/vm-virtio/Cargo.toml +++ b/vm-virtio/Cargo.toml @@ -9,5 +9,5 @@ default = [] [dependencies] log = "0.4.21" -virtio-queue = "0.11.0" +virtio-queue = "0.12.0" vm-memory = { version = "0.14.1", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] } diff --git a/vmm/Cargo.toml b/vmm/Cargo.toml index 63525a18f..c25d5d828 100644 --- a/vmm/Cargo.toml +++ b/vmm/Cargo.toml @@ -59,7 +59,7 @@ uuid = "1.8.0" 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.1", features = ["backend-mmap", "backend-atomic", "backend-bitmap"] }