mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: allow downcasting to hypervisor VM types
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -837,6 +837,10 @@ impl vm::Vm for KvmVm {
|
||||
)
|
||||
.map_err(vm::HypervisorVmError::InitMemRegionTdx)
|
||||
}
|
||||
/// Downcast to the underlying KvmVm type
|
||||
fn as_any(&self) -> &dyn Any {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "tdx")]
|
||||
|
||||
Reference in New Issue
Block a user