mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
hypervisor: always create a frozen partition
Create a partition frozen always, then unfreeze the partition during boot phase or resume phase. We also freeze the partition during pause event. Time is freeze during the time between freeze and unfreeze. Signed-off-by: Muminul Islam <muislam@microsoft.com>
This commit is contained in:
parent
aabfc9513e
commit
a5a41bf797
@ -310,6 +310,13 @@ impl hypervisor::Hypervisor for MshvHypervisor {
|
||||
)
|
||||
.map_err(|e| hypervisor::HypervisorError::SetPartitionProperty(e.into()))?;
|
||||
|
||||
// Always create a frozen partition
|
||||
fd.set_partition_property(
|
||||
hv_partition_property_code_HV_PARTITION_PROPERTY_TIME_FREEZE,
|
||||
1u64,
|
||||
)
|
||||
.map_err(|e| hypervisor::HypervisorError::SetPartitionProperty(e.into()))?;
|
||||
|
||||
let vm_fd = Arc::new(fd);
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
|
Loading…
Reference in New Issue
Block a user