mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: use memory size during VM creation
For SEV-SNP VM on MSHV we need to request page access during IO, we want to avoid such request for the page that have already been requested. In order to maintain the bitmap we need the memory size during bitmap creation. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
@@ -118,6 +118,17 @@ pub trait Hypervisor: Send + Sync {
|
||||
fn create_vm_with_type(&self, _vm_type: u64) -> Result<Arc<dyn Vm>> {
|
||||
unreachable!()
|
||||
}
|
||||
///
|
||||
/// Create a Vm of a specific type using the underlying hypervisor, passing memory size
|
||||
/// Return a hypervisor-agnostic Vm trait object
|
||||
///
|
||||
fn create_vm_with_type_and_memory(
|
||||
&self,
|
||||
_vm_type: u64,
|
||||
#[cfg(feature = "sev_snp")] _mem_size: u64,
|
||||
) -> Result<Arc<dyn Vm>> {
|
||||
unreachable!()
|
||||
}
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
///
|
||||
/// Get the supported CpuID
|
||||
|
||||
Reference in New Issue
Block a user