mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-05 19:00:04 +00:00
dragonball: Uniform the spelling of Virtio
The changes are: - VirtIoError -> VirtioError - VirtIoResult -> VirtioResult - VirtIoDevice -> VirtioDevice Fixes: #8464 Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
This commit is contained in:
@@ -382,7 +382,7 @@ mod tests {
|
|||||||
|
|
||||||
use crate::epoll_helper::*;
|
use crate::epoll_helper::*;
|
||||||
use crate::tests::{VirtQueue, VIRTQ_DESC_F_NEXT, VIRTQ_DESC_F_WRITE};
|
use crate::tests::{VirtQueue, VIRTQ_DESC_F_NEXT, VIRTQ_DESC_F_WRITE};
|
||||||
use crate::{Error as VirtIoError, VirtioQueueConfig};
|
use crate::{Error as VirtioError, VirtioQueueConfig};
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::block::*;
|
use crate::block::*;
|
||||||
@@ -829,7 +829,7 @@ mod tests {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
assert!(matches!(
|
assert!(matches!(
|
||||||
req.execute(&mut disk, m, &data_descs, &disk_id),
|
req.execute(&mut disk, m, &data_descs, &disk_id),
|
||||||
Err(ExecuteError::BadRequest(VirtIoError::InvalidOffset))
|
Err(ExecuteError::BadRequest(VirtioError::InvalidOffset))
|
||||||
));
|
));
|
||||||
|
|
||||||
let mut file = DummyFile::new();
|
let mut file = DummyFile::new();
|
||||||
|
@@ -970,7 +970,7 @@ pub mod tests {
|
|||||||
use vm_memory::GuestMemoryRegion;
|
use vm_memory::GuestMemoryRegion;
|
||||||
use vm_memory::{GuestAddress, GuestMemoryMmap, GuestRegionMmap};
|
use vm_memory::{GuestAddress, GuestMemoryMmap, GuestRegionMmap};
|
||||||
use vmm_sys_util::tempfile::TempFile;
|
use vmm_sys_util::tempfile::TempFile;
|
||||||
use Error as VirtIoError;
|
use Error as VirtioError;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::device::VirtioRegionHandler;
|
use crate::device::VirtioRegionHandler;
|
||||||
@@ -996,7 +996,7 @@ pub mod tests {
|
|||||||
fn insert_region(
|
fn insert_region(
|
||||||
&mut self,
|
&mut self,
|
||||||
_region: Arc<GuestRegionMmap>,
|
_region: Arc<GuestRegionMmap>,
|
||||||
) -> std::result::Result<(), VirtIoError> {
|
) -> std::result::Result<(), VirtioError> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ use super::defs;
|
|||||||
use super::muxer::{VsockGenericMuxer, VsockMuxer};
|
use super::muxer::{VsockGenericMuxer, VsockMuxer};
|
||||||
use super::packet::VsockPacket;
|
use super::packet::VsockPacket;
|
||||||
use crate::device::VirtioDeviceConfig;
|
use crate::device::VirtioDeviceConfig;
|
||||||
use crate::{DbsGuestAddressSpace, Result as VirtIoResult};
|
use crate::{DbsGuestAddressSpace, Result as VirtioResult};
|
||||||
|
|
||||||
const QUEUE_RX: usize = 0;
|
const QUEUE_RX: usize = 0;
|
||||||
const QUEUE_TX: usize = 1;
|
const QUEUE_TX: usize = 1;
|
||||||
@@ -83,7 +83,7 @@ where
|
|||||||
|
|
||||||
/// Signal the guest driver that we've used some virtio buffers that it had
|
/// Signal the guest driver that we've used some virtio buffers that it had
|
||||||
/// previously made available.
|
/// previously made available.
|
||||||
pub(crate) fn signal_used_queue(&self, idx: usize) -> VirtIoResult<()> {
|
pub(crate) fn signal_used_queue(&self, idx: usize) -> VirtioResult<()> {
|
||||||
trace!("{}: raising IRQ", self.id);
|
trace!("{}: raising IRQ", self.id);
|
||||||
self.config.queues[idx].notify().map_err(|e| {
|
self.config.queues[idx].notify().map_err(|e| {
|
||||||
error!("{}: failed to signal used queue {}, {:?}", self.id, idx, e);
|
error!("{}: failed to signal used queue {}, {:?}", self.id, idx, e);
|
||||||
|
@@ -5,7 +5,7 @@ use dbs_virtio_devices as virtio;
|
|||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use slog::{error, info};
|
use slog::{error, info};
|
||||||
use virtio::balloon::{Balloon, BalloonConfig};
|
use virtio::balloon::{Balloon, BalloonConfig};
|
||||||
use virtio::Error as VirtIoError;
|
use virtio::Error as VirtioError;
|
||||||
|
|
||||||
use crate::address_space_manager::GuestAddressSpaceImpl;
|
use crate::address_space_manager::GuestAddressSpaceImpl;
|
||||||
use crate::config_manager::{ConfigItem, DeviceConfigInfo, DeviceConfigInfos};
|
use crate::config_manager::{ConfigItem, DeviceConfigInfo, DeviceConfigInfos};
|
||||||
@@ -51,7 +51,7 @@ pub enum BalloonDeviceError {
|
|||||||
|
|
||||||
/// resize balloon device error
|
/// resize balloon device error
|
||||||
#[error("failure while resizing virtio-balloon device, {0}")]
|
#[error("failure while resizing virtio-balloon device, {0}")]
|
||||||
ResizeFailed(#[source] VirtIoError),
|
ResizeFailed(#[source] VirtioError),
|
||||||
|
|
||||||
/// The balloon device id doesn't exist.
|
/// The balloon device id doesn't exist.
|
||||||
#[error("invalid balloon device id '{0}'")]
|
#[error("invalid balloon device id '{0}'")]
|
||||||
|
@@ -45,7 +45,7 @@ macro_rules! error(
|
|||||||
};
|
};
|
||||||
);
|
);
|
||||||
|
|
||||||
/// Default queue size for VirtIo block devices.
|
/// Default queue size for Virtio block devices.
|
||||||
pub const QUEUE_SIZE: u16 = 128;
|
pub const QUEUE_SIZE: u16 = 128;
|
||||||
|
|
||||||
/// Errors associated with the operations allowed on a drive.
|
/// Errors associated with the operations allowed on a drive.
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
|
|
||||||
use dbs_utils::epoll_manager::EpollManager;
|
use dbs_utils::epoll_manager::EpollManager;
|
||||||
use dbs_virtio_devices::{self as virtio, Error as VirtIoError};
|
use dbs_virtio_devices::{self as virtio, Error as VirtioError};
|
||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use slog::{error, info};
|
use slog::{error, info};
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ pub enum FsDeviceError {
|
|||||||
|
|
||||||
/// Creating a shared-fs device fails (if the vhost-user socket cannot be open.)
|
/// Creating a shared-fs device fails (if the vhost-user socket cannot be open.)
|
||||||
#[error("cannot create shared-fs device: {0}")]
|
#[error("cannot create shared-fs device: {0}")]
|
||||||
CreateFsDevice(#[source] VirtIoError),
|
CreateFsDevice(#[source] VirtioError),
|
||||||
|
|
||||||
/// Cannot initialize a shared-fs device or add a device to the MMIO Bus.
|
/// Cannot initialize a shared-fs device or add a device to the MMIO Bus.
|
||||||
#[error("failure while registering shared-fs device: {0}")]
|
#[error("failure while registering shared-fs device: {0}")]
|
||||||
|
@@ -15,7 +15,7 @@ use nix::sys::mman;
|
|||||||
use serde_derive::{Deserialize, Serialize};
|
use serde_derive::{Deserialize, Serialize};
|
||||||
use slog::{debug, error, info, warn};
|
use slog::{debug, error, info, warn};
|
||||||
use virtio::mem::{Mem, MemRegionFactory};
|
use virtio::mem::{Mem, MemRegionFactory};
|
||||||
use virtio::Error as VirtIoError;
|
use virtio::Error as VirtioError;
|
||||||
use vm_memory::{
|
use vm_memory::{
|
||||||
Address, GuestAddress, GuestAddressSpace, GuestMemory, GuestRegionMmap, GuestUsize, MmapRegion,
|
Address, GuestAddress, GuestAddressSpace, GuestMemory, GuestRegionMmap, GuestUsize, MmapRegion,
|
||||||
};
|
};
|
||||||
@@ -61,7 +61,7 @@ pub enum MemDeviceError {
|
|||||||
|
|
||||||
/// resize mem device error
|
/// resize mem device error
|
||||||
#[error("failure while resizing virtio-mem device, {0}")]
|
#[error("failure while resizing virtio-mem device, {0}")]
|
||||||
ResizeFailed(#[source] VirtIoError),
|
ResizeFailed(#[source] VirtioError),
|
||||||
|
|
||||||
/// mem device does not exist
|
/// mem device does not exist
|
||||||
#[error("mem device does not exist")]
|
#[error("mem device does not exist")]
|
||||||
@@ -389,7 +389,7 @@ impl MemoryRegionFactory {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn configure_anon_mem(&self, mmap_reg: &MmapRegion) -> Result<(), VirtIoError> {
|
fn configure_anon_mem(&self, mmap_reg: &MmapRegion) -> Result<(), VirtioError> {
|
||||||
unsafe {
|
unsafe {
|
||||||
mman::madvise(
|
mman::madvise(
|
||||||
mmap_reg.as_ptr() as *mut libc::c_void,
|
mmap_reg.as_ptr() as *mut libc::c_void,
|
||||||
@@ -397,15 +397,15 @@ impl MemoryRegionFactory {
|
|||||||
mman::MmapAdvise::MADV_DONTFORK,
|
mman::MmapAdvise::MADV_DONTFORK,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.map_err(VirtIoError::Madvise)?;
|
.map_err(VirtioError::Madvise)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn configure_numa(&self, mmap_reg: &MmapRegion, node_id: u32) -> Result<(), VirtIoError> {
|
fn configure_numa(&self, mmap_reg: &MmapRegion, node_id: u32) -> Result<(), VirtioError> {
|
||||||
let nodemask = 1_u64
|
let nodemask = 1_u64
|
||||||
.checked_shl(node_id)
|
.checked_shl(node_id)
|
||||||
.ok_or(VirtIoError::InvalidInput)?;
|
.ok_or(VirtioError::InvalidInput)?;
|
||||||
let res = unsafe {
|
let res = unsafe {
|
||||||
libc::syscall(
|
libc::syscall(
|
||||||
libc::SYS_mbind,
|
libc::SYS_mbind,
|
||||||
@@ -428,7 +428,7 @@ impl MemoryRegionFactory {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn configure_thp(&mut self, mmap_reg: &MmapRegion) -> Result<(), VirtIoError> {
|
fn configure_thp(&mut self, mmap_reg: &MmapRegion) -> Result<(), VirtioError> {
|
||||||
debug!(
|
debug!(
|
||||||
self.logger,
|
self.logger,
|
||||||
"Setting MADV_HUGEPAGE on AddressSpaceRegion addr {:x?} len {:x?}",
|
"Setting MADV_HUGEPAGE on AddressSpaceRegion addr {:x?} len {:x?}",
|
||||||
@@ -445,7 +445,7 @@ impl MemoryRegionFactory {
|
|||||||
mman::MmapAdvise::MADV_HUGEPAGE,
|
mman::MmapAdvise::MADV_HUGEPAGE,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.map_err(VirtIoError::Madvise)?;
|
.map_err(VirtioError::Madvise)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -455,7 +455,7 @@ impl MemoryRegionFactory {
|
|||||||
slot: u32,
|
slot: u32,
|
||||||
reg: &Arc<AddressSpaceRegion>,
|
reg: &Arc<AddressSpaceRegion>,
|
||||||
mmap_reg: &MmapRegion,
|
mmap_reg: &MmapRegion,
|
||||||
) -> Result<(), VirtIoError> {
|
) -> Result<(), VirtioError> {
|
||||||
let host_addr = mmap_reg.as_ptr() as u64;
|
let host_addr = mmap_reg.as_ptr() as u64;
|
||||||
|
|
||||||
let flags = 0u32;
|
let flags = 0u32;
|
||||||
@@ -471,7 +471,7 @@ impl MemoryRegionFactory {
|
|||||||
// Safe because the user mem region is just created, and kvm slot is allocated
|
// Safe because the user mem region is just created, and kvm slot is allocated
|
||||||
// by resource allocator.
|
// by resource allocator.
|
||||||
unsafe { self.vm_fd.set_user_memory_region(mem_region) }
|
unsafe { self.vm_fd.set_user_memory_region(mem_region) }
|
||||||
.map_err(VirtIoError::SetUserMemoryRegion)?;
|
.map_err(VirtioError::SetUserMemoryRegion)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -483,7 +483,7 @@ impl MemRegionFactory for MemoryRegionFactory {
|
|||||||
guest_addr: GuestAddress,
|
guest_addr: GuestAddress,
|
||||||
region_len: GuestUsize,
|
region_len: GuestUsize,
|
||||||
kvm_slot: u32,
|
kvm_slot: u32,
|
||||||
) -> std::result::Result<Arc<GuestRegionMmap>, VirtIoError> {
|
) -> std::result::Result<Arc<GuestRegionMmap>, VirtioError> {
|
||||||
// create address space region
|
// create address space region
|
||||||
let mem_type = self.vm_config.mem_type.as_str();
|
let mem_type = self.vm_config.mem_type.as_str();
|
||||||
let mut mem_file_path = self.vm_config.mem_file_path.clone();
|
let mut mem_file_path = self.vm_config.mem_file_path.clone();
|
||||||
@@ -507,7 +507,7 @@ impl MemRegionFactory for MemoryRegionFactory {
|
|||||||
error!(self.logger, "failed to insert address space region: {}", e);
|
error!(self.logger, "failed to insert address space region: {}", e);
|
||||||
// dbs-virtio-devices should not depend on dbs-address-space.
|
// dbs-virtio-devices should not depend on dbs-address-space.
|
||||||
// So here io::Error is used instead of AddressSpaceError directly.
|
// So here io::Error is used instead of AddressSpaceError directly.
|
||||||
VirtIoError::IOError(io::Error::new(
|
VirtioError::IOError(io::Error::new(
|
||||||
io::ErrorKind::Other,
|
io::ErrorKind::Other,
|
||||||
format!(
|
format!(
|
||||||
"invalid address space region ({0:#x}, {1:#x})",
|
"invalid address space region ({0:#x}, {1:#x})",
|
||||||
@@ -532,7 +532,7 @@ impl MemRegionFactory for MemoryRegionFactory {
|
|||||||
region.prot_flags(),
|
region.prot_flags(),
|
||||||
region.perm_flags(),
|
region.perm_flags(),
|
||||||
)
|
)
|
||||||
.map_err(VirtIoError::NewMmapRegion)?;
|
.map_err(VirtioError::NewMmapRegion)?;
|
||||||
let host_addr: u64 = mmap_region.as_ptr() as u64;
|
let host_addr: u64 = mmap_region.as_ptr() as u64;
|
||||||
|
|
||||||
// thp
|
// thp
|
||||||
@@ -561,20 +561,20 @@ impl MemRegionFactory for MemoryRegionFactory {
|
|||||||
|
|
||||||
// All value should be valid.
|
// All value should be valid.
|
||||||
let memory_region = Arc::new(
|
let memory_region = Arc::new(
|
||||||
GuestRegionMmap::new(mmap_region, guest_addr).map_err(VirtIoError::InsertMmap)?,
|
GuestRegionMmap::new(mmap_region, guest_addr).map_err(VirtioError::InsertMmap)?,
|
||||||
);
|
);
|
||||||
|
|
||||||
let vm_as_new = self
|
let vm_as_new = self
|
||||||
.vm_as
|
.vm_as
|
||||||
.memory()
|
.memory()
|
||||||
.insert_region(memory_region.clone())
|
.insert_region(memory_region.clone())
|
||||||
.map_err(VirtIoError::InsertMmap)?;
|
.map_err(VirtioError::InsertMmap)?;
|
||||||
self.vm_as.lock().unwrap().replace(vm_as_new);
|
self.vm_as.lock().unwrap().replace(vm_as_new);
|
||||||
self.address_space.insert_region(region).map_err(|e| {
|
self.address_space.insert_region(region).map_err(|e| {
|
||||||
error!(self.logger, "failed to insert address space region: {}", e);
|
error!(self.logger, "failed to insert address space region: {}", e);
|
||||||
// dbs-virtio-devices should not depend on dbs-address-space.
|
// dbs-virtio-devices should not depend on dbs-address-space.
|
||||||
// So here io::Error is used instead of AddressSpaceError directly.
|
// So here io::Error is used instead of AddressSpaceError directly.
|
||||||
VirtIoError::IOError(io::Error::new(
|
VirtioError::IOError(io::Error::new(
|
||||||
io::ErrorKind::Other,
|
io::ErrorKind::Other,
|
||||||
format!(
|
format!(
|
||||||
"invalid address space region ({0:#x}, {1:#x})",
|
"invalid address space region ({0:#x}, {1:#x})",
|
||||||
@@ -589,7 +589,7 @@ impl MemRegionFactory for MemoryRegionFactory {
|
|||||||
fn restore_region_addr(
|
fn restore_region_addr(
|
||||||
&self,
|
&self,
|
||||||
guest_addr: GuestAddress,
|
guest_addr: GuestAddress,
|
||||||
) -> std::result::Result<*mut u8, VirtIoError> {
|
) -> std::result::Result<*mut u8, VirtioError> {
|
||||||
let memory = self.vm_as.memory();
|
let memory = self.vm_as.memory();
|
||||||
// NOTE: We can't clone `GuestRegionMmap` reference directly!!!
|
// NOTE: We can't clone `GuestRegionMmap` reference directly!!!
|
||||||
//
|
//
|
||||||
@@ -604,7 +604,7 @@ impl MemRegionFactory for MemoryRegionFactory {
|
|||||||
// a memory exception!
|
// a memory exception!
|
||||||
memory
|
memory
|
||||||
.get_host_address(guest_addr)
|
.get_host_address(guest_addr)
|
||||||
.map_err(VirtIoError::GuestMemory)
|
.map_err(VirtioError::GuestMemory)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_host_numa_node_id(&self) -> Option<u32> {
|
fn get_host_numa_node_id(&self) -> Option<u32> {
|
||||||
|
@@ -6,7 +6,7 @@ use std::io;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use dbs_address_space::{AddressSpace, AddressSpaceRegion, AddressSpaceRegionType};
|
use dbs_address_space::{AddressSpace, AddressSpaceRegion, AddressSpaceRegionType};
|
||||||
use dbs_virtio_devices::{Error as VirtIoError, VirtioRegionHandler};
|
use dbs_virtio_devices::{Error as VirtioError, VirtioRegionHandler};
|
||||||
use log::{debug, error};
|
use log::{debug, error};
|
||||||
use vm_memory::{FileOffset, GuestAddressSpace, GuestMemoryRegion, GuestRegionMmap};
|
use vm_memory::{FileOffset, GuestAddressSpace, GuestMemoryRegion, GuestRegionMmap};
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ impl DeviceVirtioRegionHandler {
|
|||||||
fn insert_address_space(
|
fn insert_address_space(
|
||||||
&mut self,
|
&mut self,
|
||||||
region: Arc<GuestRegionMmap>,
|
region: Arc<GuestRegionMmap>,
|
||||||
) -> std::result::Result<(), VirtIoError> {
|
) -> std::result::Result<(), VirtioError> {
|
||||||
let file_offset = match region.file_offset() {
|
let file_offset = match region.file_offset() {
|
||||||
// TODO: use from_arc
|
// TODO: use from_arc
|
||||||
Some(f) => Some(FileOffset::new(f.file().try_clone()?, 0)),
|
Some(f) => Some(FileOffset::new(f.file().try_clone()?, 0)),
|
||||||
@@ -63,7 +63,7 @@ impl DeviceVirtioRegionHandler {
|
|||||||
error!("inserting address apace error: {}", e);
|
error!("inserting address apace error: {}", e);
|
||||||
// dbs-virtio-devices should not depend on dbs-address-space.
|
// dbs-virtio-devices should not depend on dbs-address-space.
|
||||||
// So here io::Error is used instead of AddressSpaceError directly.
|
// So here io::Error is used instead of AddressSpaceError directly.
|
||||||
VirtIoError::IOError(io::Error::new(
|
VirtioError::IOError(io::Error::new(
|
||||||
io::ErrorKind::Other,
|
io::ErrorKind::Other,
|
||||||
format!(
|
format!(
|
||||||
"invalid address space region ({0:#x}, {1:#x})",
|
"invalid address space region ({0:#x}, {1:#x})",
|
||||||
@@ -78,13 +78,13 @@ impl DeviceVirtioRegionHandler {
|
|||||||
fn insert_vm_as(
|
fn insert_vm_as(
|
||||||
&mut self,
|
&mut self,
|
||||||
region: Arc<GuestRegionMmap>,
|
region: Arc<GuestRegionMmap>,
|
||||||
) -> std::result::Result<(), VirtIoError> {
|
) -> std::result::Result<(), VirtioError> {
|
||||||
let vm_as_new = self.vm_as.memory().insert_region(region).map_err(|e| {
|
let vm_as_new = self.vm_as.memory().insert_region(region).map_err(|e| {
|
||||||
error!(
|
error!(
|
||||||
"DeviceVirtioRegionHandler failed to insert guest memory region: {:?}.",
|
"DeviceVirtioRegionHandler failed to insert guest memory region: {:?}.",
|
||||||
e
|
e
|
||||||
);
|
);
|
||||||
VirtIoError::InsertMmap(e)
|
VirtioError::InsertMmap(e)
|
||||||
})?;
|
})?;
|
||||||
// Do not expect poisoned lock here, so safe to unwrap().
|
// Do not expect poisoned lock here, so safe to unwrap().
|
||||||
self.vm_as.lock().unwrap().replace(vm_as_new);
|
self.vm_as.lock().unwrap().replace(vm_as_new);
|
||||||
@@ -97,7 +97,7 @@ impl VirtioRegionHandler for DeviceVirtioRegionHandler {
|
|||||||
fn insert_region(
|
fn insert_region(
|
||||||
&mut self,
|
&mut self,
|
||||||
region: Arc<GuestRegionMmap>,
|
region: Arc<GuestRegionMmap>,
|
||||||
) -> std::result::Result<(), VirtIoError> {
|
) -> std::result::Result<(), VirtioError> {
|
||||||
debug!(
|
debug!(
|
||||||
"add geust memory region to address_space/vm_as, new region: {:?}",
|
"add geust memory region to address_space/vm_as, new region: {:?}",
|
||||||
region
|
region
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
use dbs_arch::pmu::PmuError;
|
use dbs_arch::pmu::PmuError;
|
||||||
#[cfg(feature = "dbs-virtio-devices")]
|
#[cfg(feature = "dbs-virtio-devices")]
|
||||||
use dbs_virtio_devices::Error as VirtIoError;
|
use dbs_virtio_devices::Error as VirtioError;
|
||||||
|
|
||||||
use crate::{address_space_manager, device_manager, resource_manager, vcpu, vm};
|
use crate::{address_space_manager, device_manager, resource_manager, vcpu, vm};
|
||||||
|
|
||||||
@@ -149,7 +149,7 @@ pub enum StartMicroVmError {
|
|||||||
#[cfg(feature = "virtio-vsock")]
|
#[cfg(feature = "virtio-vsock")]
|
||||||
/// Failed to create the vsock device.
|
/// Failed to create the vsock device.
|
||||||
#[error("cannot create virtio-vsock device: {0}")]
|
#[error("cannot create virtio-vsock device: {0}")]
|
||||||
CreateVsockDevice(#[source] VirtIoError),
|
CreateVsockDevice(#[source] VirtioError),
|
||||||
|
|
||||||
#[cfg(feature = "virtio-vsock")]
|
#[cfg(feature = "virtio-vsock")]
|
||||||
/// Cannot initialize a MMIO Vsock Device or add a device to the MMIO Bus.
|
/// Cannot initialize a MMIO Vsock Device or add a device to the MMIO Bus.
|
||||||
@@ -241,5 +241,5 @@ pub enum EpollError {
|
|||||||
#[cfg(feature = "dbs-virtio-devices")]
|
#[cfg(feature = "dbs-virtio-devices")]
|
||||||
/// Errors from virtio devices.
|
/// Errors from virtio devices.
|
||||||
#[error("failed to manager Virtio device: {0}")]
|
#[error("failed to manager Virtio device: {0}")]
|
||||||
VirtIoDevice(#[source] VirtIoError),
|
VirtioDevice(#[source] VirtioError),
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user