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 <rbradford@rivosinc.com>
(cherry picked from commit d10f20eb71)
This commit is contained in:
Rob Bradford
2024-05-01 09:35:15 +01:00
parent 8632dda669
commit 4c0784f041
11 changed files with 28 additions and 25 deletions

View File

@@ -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"

View File

@@ -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<AtomicBitmap>;
type GuestMemoryMmap = vm_memory::GuestMemoryMmap<BitmapMmapRegion>;
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<GuestMemoryAtomic<GuestMemoryMmap>>;
fn num_queues(&self) -> usize {