diff --git a/src/runtime-rs/crates/resource/src/lib.rs b/src/runtime-rs/crates/resource/src/lib.rs
index 7f391567fd..223007dec0 100644
--- a/src/runtime-rs/crates/resource/src/lib.rs
+++ b/src/runtime-rs/crates/resource/src/lib.rs
@@ -18,8 +18,7 @@ mod manager_inner;
pub mod network;
pub mod resource_persist;
use hypervisor::{
- vfio_device::VfioDeviceBase, BlockConfig, HybridVsockConfig, PortDeviceConfig,
- ProtectionDeviceConfig, VsockConfig,
+ BlockConfig, BlockConfigModern, HybridVsockConfig, PortDeviceConfig, ProtectionDeviceConfig, VsockConfig, vfio_device::VfioDeviceBase,
};
use network::NetworkConfig;
pub mod rootfs;
@@ -36,7 +35,7 @@ use kata_types::config::hypervisor::SharedFsInfo;
pub enum ResourceConfig {
Network(NetworkConfig),
ShareFs(SharedFsInfo),
- VmRootfs(BlockConfig),
+ VmRootfs(BlockConfigModern),
GuestExtensionImage(BlockConfig),
HybridVsock(HybridVsockConfig),
Vsock(VsockConfig),
diff --git a/src/runtime-rs/crates/resource/src/manager_inner.rs b/src/runtime-rs/crates/resource/src/manager_inner.rs
index 08bb268f9f..d47797aaf8 100644
--- a/src/runtime-rs/crates/resource/src/manager_inner.rs
+++ b/src/runtime-rs/crates/resource/src/manager_inner.rs
@@ -185,7 +185,7 @@ impl ResourceManagerInner {
.context("failed to handle network")?;
}
ResourceConfig::VmRootfs(r) => {
- do_handle_device(&self.device_manager, &DeviceConfig::BlockCfg(r))
+ do_handle_device(&self.device_manager, &DeviceConfig::BlockCfgModern(r))
.await
.context("do handle device failed.")?;
}
diff --git a/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs b/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs
index fb9b3dd710..dc3e5b9586 100644
--- a/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs
+++ b/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs
@@ -33,6 +33,7 @@ use hypervisor::ch::CloudHypervisor;
use hypervisor::device::topology::PCIePort;
use hypervisor::device::util::{get_host_path, DEVICE_TYPE_CHAR};
use hypervisor::remote::Remote;
+use hypervisor::{BlockConfigModern, VfioDeviceBase, is_vfio_ap_device};
use hypervisor::VsockConfig;
use hypervisor::HYPERVISOR_REMOTE;
#[cfg(all(
@@ -643,7 +644,7 @@ impl VirtSandbox {
Ok(())
}
- async fn prepare_rootfs_config(&self) -> Result