mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vhost: Move to upstream crate
The vhost crate from rust-vmm is ready, which is why we do the switch from the Cloud Hypervisor fork to the upstream crate. At the same time, we rename the crate from vhost_rs to vhost. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Generated
+1
-1
@@ -1338,7 +1338,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "vhost"
|
name = "vhost"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/cloud-hypervisor/vhost?branch=ch#6fc980bf5083d67586ab91d6a965c3a593c33a78"
|
source = "git+https://github.com/rust-vmm/vhost?branch=master#8c6919bf60bd641398ddd53864fbc74d75548837"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.2.1",
|
"bitflags 1.2.1",
|
||||||
"libc",
|
"libc",
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ vm-memory = "0.5.0"
|
|||||||
clap = { version = "2.33.3", features = ["wrap_help"] }
|
clap = { version = "2.33.3", features = ["wrap_help"] }
|
||||||
|
|
||||||
# List of patched crates
|
# List of patched crates
|
||||||
[patch.'https://github.com/rust-vmm/vhost']
|
|
||||||
vhost_rs = { git = "https://github.com/cloud-hypervisor/vhost", branch = "ch", package = "vhost", features = ["vhost-user-master", "vhost-user-slave"] }
|
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
kvm-bindings = { git = "https://github.com/cloud-hypervisor/kvm-bindings", branch = "ch", features = ["with-serde", "fam-wrappers"] }
|
kvm-bindings = { git = "https://github.com/cloud-hypervisor/kvm-bindings", branch = "ch", features = ["with-serde", "fam-wrappers"] }
|
||||||
kvm-ioctls = { git = "https://github.com/cloud-hypervisor/kvm-ioctls", branch = "ch" }
|
kvm-ioctls = { git = "https://github.com/cloud-hypervisor/kvm-ioctls", branch = "ch" }
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ virtio-bindings = "0.1.0"
|
|||||||
vm-memory = "0.5.0"
|
vm-memory = "0.5.0"
|
||||||
vm-virtio = { path = "../vm-virtio" }
|
vm-virtio = { path = "../vm-virtio" }
|
||||||
vmm-sys-util = ">=0.3.1"
|
vmm-sys-util = ">=0.3.1"
|
||||||
vhost_rs = { git = "https://github.com/rust-vmm/vhost", branch = "master", package = "vhost", features = ["vhost-user-slave"] }
|
vhost = { git = "https://github.com/rust-vmm/vhost", branch = "master", package = "vhost", features = ["vhost-user-slave"] }
|
||||||
|
|||||||
@@ -15,11 +15,11 @@ use std::os::unix::io::{AsRawFd, FromRawFd, RawFd};
|
|||||||
use std::result;
|
use std::result;
|
||||||
use std::sync::{Arc, Mutex, RwLock};
|
use std::sync::{Arc, Mutex, RwLock};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use vhost_rs::vhost_user::message::{
|
use vhost::vhost_user::message::{
|
||||||
VhostUserConfigFlags, VhostUserMemoryRegion, VhostUserProtocolFeatures,
|
VhostUserConfigFlags, VhostUserMemoryRegion, VhostUserProtocolFeatures,
|
||||||
VhostUserVirtioFeatures, VhostUserVringAddrFlags, VhostUserVringState,
|
VhostUserVirtioFeatures, VhostUserVringAddrFlags, VhostUserVringState,
|
||||||
};
|
};
|
||||||
use vhost_rs::vhost_user::{
|
use vhost::vhost_user::{
|
||||||
Error as VhostUserError, Listener, Result as VhostUserResult, SlaveFsCacheReq, SlaveListener,
|
Error as VhostUserError, Listener, Result as VhostUserResult, SlaveFsCacheReq, SlaveListener,
|
||||||
VhostUserSlaveReqHandler,
|
VhostUserSlaveReqHandler,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ log = "0.4.14"
|
|||||||
option_parser = { path = "../option_parser" }
|
option_parser = { path = "../option_parser" }
|
||||||
qcow = { path = "../qcow" }
|
qcow = { path = "../qcow" }
|
||||||
vhost_user_backend = { path = "../vhost_user_backend" }
|
vhost_user_backend = { path = "../vhost_user_backend" }
|
||||||
vhost_rs = { git = "https://github.com/rust-vmm/vhost", branch = "master", package = "vhost", features = ["vhost-user-slave"] }
|
vhost = { git = "https://github.com/rust-vmm/vhost", branch = "master", package = "vhost", features = ["vhost-user-slave"] }
|
||||||
virtio-bindings = "0.1.0"
|
virtio-bindings = "0.1.0"
|
||||||
vm-memory = "0.5.0"
|
vm-memory = "0.5.0"
|
||||||
vmm-sys-util = ">=0.3.1"
|
vmm-sys-util = ">=0.3.1"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
extern crate block_util;
|
extern crate block_util;
|
||||||
extern crate log;
|
extern crate log;
|
||||||
extern crate vhost_rs;
|
extern crate vhost;
|
||||||
extern crate vhost_user_backend;
|
extern crate vhost_user_backend;
|
||||||
|
|
||||||
use block_util::{build_disk_image_id, Request, VirtioBlockConfig};
|
use block_util::{build_disk_image_id, Request, VirtioBlockConfig};
|
||||||
@@ -33,8 +33,8 @@ use std::sync::{Arc, Mutex, RwLock};
|
|||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
use std::{convert, error, fmt, io};
|
use std::{convert, error, fmt, io};
|
||||||
use vhost_rs::vhost_user::message::*;
|
use vhost::vhost_user::message::*;
|
||||||
use vhost_rs::vhost_user::Listener;
|
use vhost::vhost_user::Listener;
|
||||||
use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring};
|
use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring};
|
||||||
use virtio_bindings::bindings::virtio_blk::*;
|
use virtio_bindings::bindings::virtio_blk::*;
|
||||||
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ log = "0.4.14"
|
|||||||
net_util = { path = "../net_util" }
|
net_util = { path = "../net_util" }
|
||||||
option_parser = { path = "../option_parser" }
|
option_parser = { path = "../option_parser" }
|
||||||
vhost_user_backend = { path = "../vhost_user_backend" }
|
vhost_user_backend = { path = "../vhost_user_backend" }
|
||||||
vhost_rs = { git = "https://github.com/rust-vmm/vhost", branch = "master", package = "vhost", features = ["vhost-user-slave"] }
|
vhost = { git = "https://github.com/rust-vmm/vhost", branch = "master", package = "vhost", features = ["vhost-user-slave"] }
|
||||||
virtio-bindings = "0.1.0"
|
virtio-bindings = "0.1.0"
|
||||||
vm-memory = "0.5.0"
|
vm-memory = "0.5.0"
|
||||||
vmm-sys-util = ">=0.3.1"
|
vmm-sys-util = ">=0.3.1"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
extern crate log;
|
extern crate log;
|
||||||
extern crate net_util;
|
extern crate net_util;
|
||||||
extern crate vhost_rs;
|
extern crate vhost;
|
||||||
extern crate vhost_user_backend;
|
extern crate vhost_user_backend;
|
||||||
|
|
||||||
use libc::{self, EFD_NONBLOCK};
|
use libc::{self, EFD_NONBLOCK};
|
||||||
@@ -24,8 +24,8 @@ use std::os::unix::io::AsRawFd;
|
|||||||
use std::process;
|
use std::process;
|
||||||
use std::sync::{Arc, Mutex, RwLock};
|
use std::sync::{Arc, Mutex, RwLock};
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
use vhost_rs::vhost_user::message::*;
|
use vhost::vhost_user::message::*;
|
||||||
use vhost_rs::vhost_user::{Error as VhostUserError, Listener};
|
use vhost::vhost_user::{Error as VhostUserError, Listener};
|
||||||
use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring, VringWorker};
|
use vhost_user_backend::{VhostUserBackend, VhostUserDaemon, Vring, VringWorker};
|
||||||
use virtio_bindings::bindings::virtio_net::*;
|
use virtio_bindings::bindings::virtio_net::*;
|
||||||
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ seccomp = { git = "https://github.com/firecracker-microvm/firecracker", tag = "v
|
|||||||
serde = ">=1.0.27"
|
serde = ">=1.0.27"
|
||||||
serde_derive = ">=1.0.27"
|
serde_derive = ">=1.0.27"
|
||||||
serde_json = ">=1.0.9"
|
serde_json = ">=1.0.9"
|
||||||
vhost_rs = { git = "https://github.com/rust-vmm/vhost", branch = "master", package = "vhost", features = ["vhost-user-master", "vhost-user-slave"] }
|
vhost = { git = "https://github.com/rust-vmm/vhost", branch = "master", package = "vhost", features = ["vhost-user-master", "vhost-user-slave"] }
|
||||||
virtio-bindings = { version = "0.1", features = ["virtio-v5_0_0"]}
|
virtio-bindings = { version = "0.1", features = ["virtio-v5_0_0"]}
|
||||||
vm-allocator = { path = "../vm-allocator" }
|
vm-allocator = { path = "../vm-allocator" }
|
||||||
vm-device = { path = "../vm-device" }
|
vm-device = { path = "../vm-device" }
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ extern crate serde;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate serde_derive;
|
extern crate serde_derive;
|
||||||
extern crate serde_json;
|
extern crate serde_json;
|
||||||
extern crate vhost_rs;
|
extern crate vhost;
|
||||||
extern crate virtio_bindings;
|
extern crate virtio_bindings;
|
||||||
extern crate vm_device;
|
extern crate vm_device;
|
||||||
extern crate vm_memory;
|
extern crate vm_memory;
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ use std::result;
|
|||||||
use std::sync::{Arc, Barrier};
|
use std::sync::{Arc, Barrier};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
use vhost_rs::vhost_user::message::VhostUserConfigFlags;
|
use vhost::vhost_user::message::VhostUserConfigFlags;
|
||||||
use vhost_rs::vhost_user::message::VHOST_USER_CONFIG_OFFSET;
|
use vhost::vhost_user::message::VHOST_USER_CONFIG_OFFSET;
|
||||||
use vhost_rs::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
use vhost::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
||||||
use vhost_rs::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
use vhost::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
||||||
use vhost_rs::VhostBackend;
|
use vhost::VhostBackend;
|
||||||
use virtio_bindings::bindings::virtio_blk::*;
|
use virtio_bindings::bindings::virtio_blk::*;
|
||||||
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
||||||
use vm_memory::{ByteValued, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryMmap};
|
use vm_memory::{ByteValued, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryMmap};
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ use std::os::unix::io::{AsRawFd, RawFd};
|
|||||||
use std::result;
|
use std::result;
|
||||||
use std::sync::{Arc, Barrier, Mutex};
|
use std::sync::{Arc, Barrier, Mutex};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use vhost_rs::vhost_user::message::{
|
use vhost::vhost_user::message::{
|
||||||
VhostUserFSSlaveMsg, VhostUserFSSlaveMsgFlags, VhostUserProtocolFeatures,
|
VhostUserFSSlaveMsg, VhostUserFSSlaveMsgFlags, VhostUserProtocolFeatures,
|
||||||
VhostUserVirtioFeatures, VHOST_USER_FS_SLAVE_ENTRIES,
|
VhostUserVirtioFeatures, VHOST_USER_FS_SLAVE_ENTRIES,
|
||||||
};
|
};
|
||||||
use vhost_rs::vhost_user::{
|
use vhost::vhost_user::{
|
||||||
HandlerResult, Master, MasterReqHandler, VhostUserMaster, VhostUserMasterReqHandler,
|
HandlerResult, Master, MasterReqHandler, VhostUserMaster, VhostUserMasterReqHandler,
|
||||||
};
|
};
|
||||||
use vhost_rs::VhostBackend;
|
use vhost::VhostBackend;
|
||||||
use vm_memory::{
|
use vm_memory::{
|
||||||
Address, ByteValued, GuestAddress, GuestAddressSpace, GuestMemory, GuestMemoryAtomic,
|
Address, ByteValued, GuestAddress, GuestAddressSpace, GuestMemory, GuestMemoryAtomic,
|
||||||
GuestMemoryMmap, MmapRegion,
|
GuestMemoryMmap, MmapRegion,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use crate::VirtioInterrupt;
|
|||||||
use std::os::unix::io::AsRawFd;
|
use std::os::unix::io::AsRawFd;
|
||||||
use std::sync::atomic::AtomicBool;
|
use std::sync::atomic::AtomicBool;
|
||||||
use std::sync::{Arc, Barrier};
|
use std::sync::{Arc, Barrier};
|
||||||
use vhost_rs::vhost_user::{MasterReqHandler, VhostUserMasterReqHandler};
|
use vhost::vhost_user::{MasterReqHandler, VhostUserMasterReqHandler};
|
||||||
|
|
||||||
/// Collection of common parameters required by vhost-user devices while
|
/// Collection of common parameters required by vhost-user devices while
|
||||||
/// call Epoll handler.
|
/// call Epoll handler.
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
|
|
||||||
extern crate epoll;
|
extern crate epoll;
|
||||||
extern crate net_util;
|
extern crate net_util;
|
||||||
extern crate vhost_rs;
|
extern crate vhost;
|
||||||
extern crate virtio_bindings;
|
extern crate virtio_bindings;
|
||||||
extern crate vm_memory;
|
extern crate vm_memory;
|
||||||
|
|
||||||
use std::io;
|
use std::io;
|
||||||
use vhost_rs::Error as VhostError;
|
use vhost::Error as VhostError;
|
||||||
use vm_memory::Error as MmapError;
|
use vm_memory::Error as MmapError;
|
||||||
|
|
||||||
pub mod blk;
|
pub mod blk;
|
||||||
@@ -43,7 +43,7 @@ pub enum Error {
|
|||||||
/// Failed to open vhost device.
|
/// Failed to open vhost device.
|
||||||
VhostUserOpen(VhostError),
|
VhostUserOpen(VhostError),
|
||||||
/// Connection to socket failed.
|
/// Connection to socket failed.
|
||||||
VhostUserConnect(vhost_rs::Error),
|
VhostUserConnect(vhost::Error),
|
||||||
/// Get features failed.
|
/// Get features failed.
|
||||||
VhostUserGetFeatures(VhostError),
|
VhostUserGetFeatures(VhostError),
|
||||||
/// Get queue max number failed.
|
/// Get queue max number failed.
|
||||||
@@ -81,9 +81,9 @@ pub enum Error {
|
|||||||
/// Failed to read vhost eventfd.
|
/// Failed to read vhost eventfd.
|
||||||
VhostUserMemoryRegion(MmapError),
|
VhostUserMemoryRegion(MmapError),
|
||||||
/// Failed to create the master request handler from slave.
|
/// Failed to create the master request handler from slave.
|
||||||
MasterReqHandlerCreation(vhost_rs::vhost_user::Error),
|
MasterReqHandlerCreation(vhost::vhost_user::Error),
|
||||||
/// Set slave request fd failed.
|
/// Set slave request fd failed.
|
||||||
VhostUserSetSlaveRequestFd(vhost_rs::Error),
|
VhostUserSetSlaveRequestFd(vhost::Error),
|
||||||
/// Invalid used address.
|
/// Invalid used address.
|
||||||
UsedAddress,
|
UsedAddress,
|
||||||
/// Invalid features provided from vhost-user backend
|
/// Invalid features provided from vhost-user backend
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ use std::result;
|
|||||||
use std::sync::{Arc, Barrier};
|
use std::sync::{Arc, Barrier};
|
||||||
use std::thread;
|
use std::thread;
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
use vhost_rs::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
use vhost::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
||||||
use vhost_rs::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
use vhost::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
||||||
use vhost_rs::VhostBackend;
|
use vhost::VhostBackend;
|
||||||
use virtio_bindings::bindings::virtio_net;
|
use virtio_bindings::bindings::virtio_net;
|
||||||
use virtio_bindings::bindings::virtio_ring;
|
use virtio_bindings::bindings::virtio_ring;
|
||||||
use vm_memory::{ByteValued, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryMmap};
|
use vm_memory::{ByteValued, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryMmap};
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ use std::convert::TryInto;
|
|||||||
use std::os::unix::io::AsRawFd;
|
use std::os::unix::io::AsRawFd;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::vec::Vec;
|
use std::vec::Vec;
|
||||||
use vhost_rs::vhost_user::{Master, VhostUserMaster};
|
use vhost::vhost_user::{Master, VhostUserMaster};
|
||||||
use vhost_rs::{VhostBackend, VhostUserMemoryRegionInfo, VringConfigData};
|
use vhost::{VhostBackend, VhostUserMemoryRegionInfo, VringConfigData};
|
||||||
use vm_memory::{Address, Error as MmapError, GuestMemory, GuestMemoryMmap, GuestMemoryRegion};
|
use vm_memory::{Address, Error as MmapError, GuestMemory, GuestMemoryMmap, GuestMemoryRegion};
|
||||||
use vmm_sys_util::eventfd::EventFd;
|
use vmm_sys_util::eventfd::EventFd;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user