mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-29 16:05:20 +00:00
adf297066d
In case the VM is created from scratch, the devices should be created after the DeviceManager has been created. But this should not affect the restore codepath, as in this case the devices should be created as part of the restore() function. It's necessary to perform this differentiation as the restore must go through the following steps: - Create the DeviceManager - Restore the DeviceManager with the right state - Create the devices based on the restored DeviceManager's device tree - Restore each device based on the restored DeviceManager's device tree That's why this patch leverages the recent split of the DeviceManager's creation to achieve what's needed. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>