Skip to content

Commit

Permalink
fix ci complains
Browse files Browse the repository at this point in the history
Signed-off-by: Chao Wu <chaowu@linux.alibaba.com>
  • Loading branch information
studychao committed Dec 28, 2023
1 parent f9e0a4b commit 31cde2b
Show file tree
Hide file tree
Showing 8 changed files with 376 additions and 13 deletions.
320 changes: 312 additions & 8 deletions src/agent/Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/dragonball/src/api/v1/vmm_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub use crate::device_manager::fs_dev_mgr::{
#[cfg(feature = "virtio-mem")]
pub use crate::device_manager::mem_dev_mgr::{MemDeviceConfigInfo, MemDeviceError};
#[cfg(feature = "host-device")]
use crate::device_manager::vfio_dev_mgr::{HostDeviceConfig, VfioDeviceError, VfioDeviceHostInfo};
use crate::device_manager::vfio_dev_mgr::{HostDeviceConfig, VfioDeviceError};
#[cfg(feature = "vhost-net")]
pub use crate::device_manager::vhost_net_dev_mgr::{
VhostNetDeviceConfigInfo, VhostNetDeviceError, VhostNetDeviceMgr,
Expand Down
2 changes: 1 addition & 1 deletion src/dragonball/src/dbs_pci/src/vfio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl Interrupt {

fn get_irq_pin(&self) -> u32 {
if let Some(legacy_irq) = self.legacy_irq {
(PciInterruptPin::IntA as u32) << 8 | self.legacy_irq.unwrap()
(PciInterruptPin::IntA as u32) << 8 | legacy_irq
} else {
0
}
Expand Down
8 changes: 7 additions & 1 deletion src/dragonball/src/device_manager/vfio_dev_mgr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ pub enum VfioDeviceError {
#[error("failure while allocate device resource: {0:?}")]
AllocateDeviceResource(#[source] ResourceError),

/// Failed to free device resource
#[error("failure while freeing device resource: {0:?}")]
FreeDeviceResource(#[source] ResourceError),

/// Vfio container not found
#[error("vfio container not found")]
VfioContainerNotFound,
Expand Down Expand Up @@ -678,7 +682,9 @@ impl VfioDeviceMgr {
resources
};

ctx.res_manager.free_device_resources(&filtered_resources);
ctx.res_manager
.free_device_resources(&filtered_resources)
.map_err(VfioDeviceError::FreeDeviceResource)?;

vfio_pci_device
.clear_device()
Expand Down
1 change: 1 addition & 0 deletions src/dragonball/src/vm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ pub struct Vm {
shared_info: Arc<RwLock<InstanceInfo>>,

address_space: AddressSpaceMgr,
/// device manager for Dragonball
pub device_manager: DeviceManager,
dmesg_fifo: Option<Box<dyn io::Write + Send>>,
kernel_config: Option<KernelConfigInfo>,
Expand Down
2 changes: 1 addition & 1 deletion src/libs/kata-types/src/annotations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ impl Annotation {
}
// Hypervisor Memory related annotations
KATA_ANNO_CFG_HYPERVISOR_DEFAULT_MEMORY => {
match byte_unit::Byte::parse_str(value,true) {
match byte_unit::Byte::parse_str(value, true) {
Ok(mem_bytes) => {
let memory_size = mem_bytes
.get_adjusted_unit(byte_unit::Unit::MiB)
Expand Down
52 changes: 52 additions & 0 deletions src/runtime-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/runtime-rs/crates/hypervisor/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ kata-types = { path = "../../../libs/kata-types" }
logging = { path = "../../../libs/logging" }
shim-interface = { path = "../../../libs/shim-interface" }

dragonball = { path = "../../../dragonball", features = ["atomic-guest-memory", "virtio-vsock", "hotplug", "virtio-blk", "virtio-net", "virtio-fs", "vhost-net", "dbs-upcall","virtio-mem", "virtio-balloon", "vhost-user-net"] }
dragonball = { path = "../../../dragonball", features = ["atomic-guest-memory", "virtio-vsock", "hotplug", "virtio-blk", "virtio-net", "virtio-fs", "vhost-net", "dbs-upcall", "virtio-mem", "virtio-balloon", "vhost-user-net", "host-device"] }

ch-config = { path = "ch-config", optional = true }
tests_utils = { path = "../../tests/utils" }
Expand Down

0 comments on commit 31cde2b

Please sign in to comment.