hypervisor: Add enable_sgx_attribute to the Vm API

We need a dedicated function to enable the SGX attribute capability
through the Hypervisor abstraction.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2021-07-07 12:03:05 +02:00
parent 3d4e27fa0a
commit 9ec0c981f8
3 changed files with 32 additions and 0 deletions

View File

@@ -28,6 +28,8 @@ pub use x86_64::VcpuMshvState as CpuState;
#[cfg(target_arch = "x86_64")]
pub use x86_64::*;
#[cfg(target_arch = "x86_64")]
use std::fs::File;
use std::os::unix::io::AsRawFd;
use std::sync::RwLock;
@@ -760,6 +762,10 @@ impl vm::Vm for MshvVm {
fn enable_split_irq(&self) -> vm::Result<()> {
Ok(())
}
#[cfg(target_arch = "x86_64")]
fn enable_sgx_attribute(&self, _file: File) -> vm::Result<()> {
Ok(())
}
fn register_ioevent(
&self,
fd: &EventFd,