Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions vmm/src/device_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,11 @@ impl DeviceManager {
Ok(())
}

/// Drop restore-only state once all devices have consumed it.
pub(crate) fn clear_restore_snapshot(&mut self) {
self.snapshot = None;
}

#[cfg(feature = "fw_cfg")]
pub fn create_fw_cfg_device(&mut self) -> Result<(), DeviceManagerError> {
let fw_cfg = Arc::new(Mutex::new(devices::legacy::FwCfg::new(
Expand Down
3 changes: 3 additions & 0 deletions vmm/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,9 @@ impl Vm {
snapshot,
)?;

// Remove any snapshot artifacts after the hypervisor-specific init.
device_manager.lock().unwrap().clear_restore_snapshot();

// Load kernel and initramfs files
#[cfg(feature = "tdx")]
let kernel = config
Expand Down
Loading