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
1 changed files with 7 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue