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:
parent
d73971e407
commit
53f4fed516
2 changed files with 0 additions and 10 deletions
|
|
@ -79,10 +79,6 @@ pub trait Hypervisor: Send + Sync {
|
|||
///
|
||||
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
|
||||
///
|
||||
fn get_vcpu_mmap_size(&self) -> Result<usize>;
|
||||
|
|
|
|||
|
|
@ -424,12 +424,6 @@ impl hypervisor::Hypervisor for KvmHypervisor {
|
|||
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.
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue