hypervisor, vmm: Add default Hypervisor::check_required_extensions()

This allows the removal of KVM specific compile time checks on this
function.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2021-05-19 13:09:13 +00:00
committed by Sebastien Boeuf
parent 2439625785
commit 0cf9218d3f
2 changed files with 6 additions and 5 deletions

View File

@@ -83,11 +83,12 @@ pub trait Hypervisor: Send + Sync {
/// Get the supported CpuID
///
fn get_cpuid(&self) -> Result<CpuId>;
#[cfg(not(feature = "mshv"))]
///
/// Check particular extensions if any
///
fn check_required_extensions(&self) -> Result<()>;
fn check_required_extensions(&self) -> Result<()> {
Ok(())
}
#[cfg(target_arch = "x86_64")]
///
/// Retrieve the list of MSRs supported by the hypervisor.