hypervisor: Export check_extension() API from hypervisor::Vm

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao
2020-07-07 14:19:15 +08:00
committed by Rob Bradford
parent f2e484750a
commit 82a0e29c7a
2 changed files with 7 additions and 0 deletions

View File

@@ -250,6 +250,10 @@ impl vm::Vm for KvmVm {
.set_clock(data)
.map_err(|e| vm::HypervisorVmError::SetClock(e.into()))
}
/// Checks if a particular `Cap` is available.
fn check_extension(&self, c: Cap) -> bool {
self.fd.check_extension(c)
}
}
/// Wrapper over KVM system ioctls.
pub struct KvmHypervisor {