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:
@@ -21,7 +21,7 @@ extern crate serde;
|
||||
#[macro_use]
|
||||
extern crate serde_derive;
|
||||
extern crate serde_json;
|
||||
extern crate vhost_rs;
|
||||
extern crate vhost;
|
||||
extern crate virtio_bindings;
|
||||
extern crate vm_device;
|
||||
extern crate vm_memory;
|
||||
|
||||
@@ -17,11 +17,11 @@ use std::result;
|
||||
use std::sync::{Arc, Barrier};
|
||||
use std::thread;
|
||||
use std::vec::Vec;
|
||||
use vhost_rs::vhost_user::message::VhostUserConfigFlags;
|
||||
use vhost_rs::vhost_user::message::VHOST_USER_CONFIG_OFFSET;
|
||||
use vhost_rs::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
||||
use vhost_rs::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
||||
use vhost_rs::VhostBackend;
|
||||
use vhost::vhost_user::message::VhostUserConfigFlags;
|
||||
use vhost::vhost_user::message::VHOST_USER_CONFIG_OFFSET;
|
||||
use vhost::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
||||
use vhost::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
||||
use vhost::VhostBackend;
|
||||
use virtio_bindings::bindings::virtio_blk::*;
|
||||
use virtio_bindings::bindings::virtio_ring::VIRTIO_RING_F_EVENT_IDX;
|
||||
use vm_memory::{ByteValued, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryMmap};
|
||||
|
||||
@@ -16,14 +16,14 @@ use std::os::unix::io::{AsRawFd, RawFd};
|
||||
use std::result;
|
||||
use std::sync::{Arc, Barrier, Mutex};
|
||||
use std::thread;
|
||||
use vhost_rs::vhost_user::message::{
|
||||
use vhost::vhost_user::message::{
|
||||
VhostUserFSSlaveMsg, VhostUserFSSlaveMsgFlags, VhostUserProtocolFeatures,
|
||||
VhostUserVirtioFeatures, VHOST_USER_FS_SLAVE_ENTRIES,
|
||||
};
|
||||
use vhost_rs::vhost_user::{
|
||||
use vhost::vhost_user::{
|
||||
HandlerResult, Master, MasterReqHandler, VhostUserMaster, VhostUserMasterReqHandler,
|
||||
};
|
||||
use vhost_rs::VhostBackend;
|
||||
use vhost::VhostBackend;
|
||||
use vm_memory::{
|
||||
Address, ByteValued, GuestAddress, GuestAddressSpace, GuestMemory, GuestMemoryAtomic,
|
||||
GuestMemoryMmap, MmapRegion,
|
||||
|
||||
@@ -18,7 +18,7 @@ use crate::VirtioInterrupt;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::sync::atomic::AtomicBool;
|
||||
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
|
||||
/// call Epoll handler.
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
extern crate epoll;
|
||||
extern crate net_util;
|
||||
extern crate vhost_rs;
|
||||
extern crate vhost;
|
||||
extern crate virtio_bindings;
|
||||
extern crate vm_memory;
|
||||
|
||||
use std::io;
|
||||
use vhost_rs::Error as VhostError;
|
||||
use vhost::Error as VhostError;
|
||||
use vm_memory::Error as MmapError;
|
||||
|
||||
pub mod blk;
|
||||
@@ -43,7 +43,7 @@ pub enum Error {
|
||||
/// Failed to open vhost device.
|
||||
VhostUserOpen(VhostError),
|
||||
/// Connection to socket failed.
|
||||
VhostUserConnect(vhost_rs::Error),
|
||||
VhostUserConnect(vhost::Error),
|
||||
/// Get features failed.
|
||||
VhostUserGetFeatures(VhostError),
|
||||
/// Get queue max number failed.
|
||||
@@ -81,9 +81,9 @@ pub enum Error {
|
||||
/// Failed to read vhost eventfd.
|
||||
VhostUserMemoryRegion(MmapError),
|
||||
/// 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.
|
||||
VhostUserSetSlaveRequestFd(vhost_rs::Error),
|
||||
VhostUserSetSlaveRequestFd(vhost::Error),
|
||||
/// Invalid used address.
|
||||
UsedAddress,
|
||||
/// Invalid features provided from vhost-user backend
|
||||
|
||||
@@ -19,9 +19,9 @@ use std::result;
|
||||
use std::sync::{Arc, Barrier};
|
||||
use std::thread;
|
||||
use std::vec::Vec;
|
||||
use vhost_rs::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
||||
use vhost_rs::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
||||
use vhost_rs::VhostBackend;
|
||||
use vhost::vhost_user::message::{VhostUserProtocolFeatures, VhostUserVirtioFeatures};
|
||||
use vhost::vhost_user::{Master, VhostUserMaster, VhostUserMasterReqHandler};
|
||||
use vhost::VhostBackend;
|
||||
use virtio_bindings::bindings::virtio_net;
|
||||
use virtio_bindings::bindings::virtio_ring;
|
||||
use vm_memory::{ByteValued, GuestAddressSpace, GuestMemoryAtomic, GuestMemoryMmap};
|
||||
|
||||
@@ -9,8 +9,8 @@ use std::convert::TryInto;
|
||||
use std::os::unix::io::AsRawFd;
|
||||
use std::sync::Arc;
|
||||
use std::vec::Vec;
|
||||
use vhost_rs::vhost_user::{Master, VhostUserMaster};
|
||||
use vhost_rs::{VhostBackend, VhostUserMemoryRegionInfo, VringConfigData};
|
||||
use vhost::vhost_user::{Master, VhostUserMaster};
|
||||
use vhost::{VhostBackend, VhostUserMemoryRegionInfo, VringConfigData};
|
||||
use vm_memory::{Address, Error as MmapError, GuestMemory, GuestMemoryMmap, GuestMemoryRegion};
|
||||
use vmm_sys_util::eventfd::EventFd;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user