From 53f4fed5162a9eeef38964f22f377e0bb24643c4 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Mon, 7 Sep 2020 10:12:13 +0000 Subject: [PATCH] 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 --- hypervisor/src/hypervisor.rs | 4 ---- hypervisor/src/kvm/mod.rs | 6 ------ 2 files changed, 10 deletions(-) diff --git a/hypervisor/src/hypervisor.rs b/hypervisor/src/hypervisor.rs index 4fcceae71..88479bbdd 100644 --- a/hypervisor/src/hypervisor.rs +++ b/hypervisor/src/hypervisor.rs @@ -79,10 +79,6 @@ pub trait Hypervisor: Send + Sync { /// fn create_vm(&self) -> Result>; /// - /// 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; diff --git a/hypervisor/src/kvm/mod.rs b/hypervisor/src/kvm/mod.rs index 2efc75402..40dc11837 100644 --- a/hypervisor/src/kvm/mod.rs +++ b/hypervisor/src/kvm/mod.rs @@ -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. ///