1
0
mirror of https://github.com/cloud-hypervisor/cloud-hypervisor.git synced 2025-03-07 17:26:14 +00:00

hypervisor: drop get_api_version from Hypervisor trait

The new function already checks if the API version is compatible. There
is no need to expose the get_api_version function to code outside
hypervisor crate.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2020-09-07 10:12:13 +00:00 committed by Rob Bradford
parent d73971e407
commit 53f4fed516
2 changed files with 0 additions and 10 deletions
hypervisor/src

@ -79,10 +79,6 @@ pub trait Hypervisor: Send + Sync {
/// ///
fn create_vm(&self) -> Result<Arc<dyn Vm>>; fn create_vm(&self) -> Result<Arc<dyn Vm>>;
/// ///
/// Get the API version of the hypervisor
///
fn get_api_version(&self) -> i32;
///
/// Returns the size of the memory mapping required to use the vcpu's structures /// Returns the size of the memory mapping required to use the vcpu's structures
/// ///
fn get_vcpu_mmap_size(&self) -> Result<usize>; fn get_vcpu_mmap_size(&self) -> Result<usize>;

@ -424,12 +424,6 @@ impl hypervisor::Hypervisor for KvmHypervisor {
Ok(()) Ok(())
} }
///
/// Returns the KVM API version.
///
fn get_api_version(&self) -> i32 {
self.kvm.get_api_version()
}
/// ///
/// Returns the size of the memory mapping required to use the vcpu's `kvm_run` structure. /// Returns the size of the memory mapping required to use the vcpu's `kvm_run` structure.
/// ///