hypervisor: mshv: add definition to get access pages

Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
Muminul Islam
2024-07-17 15:50:14 -07:00
committed by Liu Wei
parent f9bd2aaf9f
commit 5c4b5c0e40
2 changed files with 45 additions and 0 deletions

View File

@@ -235,6 +235,12 @@ pub enum HypervisorVmError {
///
#[error("Failed to set VM property: {0}")]
SetVmProperty(#[source] anyhow::Error),
///
/// Modify GPA host access error
///
#[cfg(feature = "sev_snp")]
#[error("Failed to modify GPA host access: {0}")]
ModifyGpaHostAccess(#[source] anyhow::Error),
}
///
/// Result type for returning from a function
@@ -404,6 +410,11 @@ pub trait Vm: Send + Sync + Any {
fn resume(&self) -> Result<()> {
Ok(())
}
#[cfg(feature = "sev_snp")]
fn gain_page_access(&self, _gpa: u64, _size: u32) -> Result<()> {
Ok(())
}
}
pub trait VmOps: Send + Sync {