mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Provide a restoring state to the DeviceManager
In anticipation for creating vhost-user devices in a different way when being restored compared to a fresh start, this commit introduces a new boolean created by the Vm depending on the use case, and passed down to the DeviceManager. In the future, the DeviceManager will use this flag to assess how vhost-user devices should be created. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
@@ -541,6 +541,7 @@ impl Vm {
|
||||
hypervisor::ClockData,
|
||||
>,
|
||||
activate_evt: EventFd,
|
||||
restoring: bool,
|
||||
) -> Result<Self> {
|
||||
config
|
||||
.lock()
|
||||
@@ -571,6 +572,7 @@ impl Vm {
|
||||
numa_nodes.clone(),
|
||||
&activate_evt,
|
||||
force_iommu,
|
||||
restoring,
|
||||
)
|
||||
.map_err(Error::DeviceManager)?;
|
||||
|
||||
@@ -796,6 +798,7 @@ impl Vm {
|
||||
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
|
||||
None,
|
||||
activate_evt,
|
||||
false,
|
||||
)?;
|
||||
|
||||
// The device manager must create the devices from here as it is part
|
||||
@@ -865,6 +868,7 @@ impl Vm {
|
||||
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
|
||||
vm_snapshot.clock,
|
||||
activate_evt,
|
||||
true,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -907,6 +911,7 @@ impl Vm {
|
||||
#[cfg(all(feature = "kvm", target_arch = "x86_64"))]
|
||||
None,
|
||||
activate_evt,
|
||||
true,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user