mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 23:04:20 +01:00
runtime-rs: bring hybridVsock devices in manager.
Currently, virtio_vsock are still outside of the device manager. This causes some management issues,such as the inability to unify PCI address management. Just do some work for hybrid vsock. Fixes: #7655 Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -17,7 +17,7 @@ pub mod manager;
|
||||
mod manager_inner;
|
||||
pub mod network;
|
||||
pub mod resource_persist;
|
||||
use hypervisor::BlockConfig;
|
||||
use hypervisor::{BlockConfig, HybridVsockConfig};
|
||||
use network::NetworkConfig;
|
||||
pub mod rootfs;
|
||||
pub mod share_fs;
|
||||
@@ -32,6 +32,7 @@ pub enum ResourceConfig {
|
||||
Network(NetworkConfig),
|
||||
ShareFs(SharedFsInfo),
|
||||
VmRootfs(BlockConfig),
|
||||
HybridVsock(HybridVsockConfig),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
|
||||
@@ -126,6 +126,11 @@ impl ResourceManagerInner {
|
||||
.await
|
||||
.context("do handle device failed.")?;
|
||||
}
|
||||
ResourceConfig::HybridVsock(hv) => {
|
||||
do_handle_device(&self.device_manager, &DeviceConfig::HybridVsockCfg(hv))
|
||||
.await
|
||||
.context("do handle hybrid-vsock device failed.")?;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user