mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Propagate the set of memory slots to FDs received in migration
Create the VM using the FDs (wrapped in Files) that have been received during the migration process. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
@@ -867,6 +867,7 @@ impl Vm {
|
||||
)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn new_from_migration(
|
||||
config: Arc<Mutex<VmConfig>>,
|
||||
exit_evt: EventFd,
|
||||
@@ -875,6 +876,7 @@ impl Vm {
|
||||
hypervisor: Arc<dyn hypervisor::Hypervisor>,
|
||||
activate_evt: EventFd,
|
||||
memory_manager_data: &MemoryManagerSnapshotData,
|
||||
existing_memory_files: Option<HashMap<u32, File>>,
|
||||
) -> Result<Self> {
|
||||
hypervisor.check_required_extensions().unwrap();
|
||||
let vm = hypervisor.create_vm().unwrap();
|
||||
@@ -897,7 +899,7 @@ impl Vm {
|
||||
#[cfg(feature = "tdx")]
|
||||
false,
|
||||
Some(memory_manager_data),
|
||||
None,
|
||||
existing_memory_files,
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user