mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +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:
parent
d73971e407
commit
53f4fed516
@ -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…
x
Reference in New Issue
Block a user