mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-22 20:45:21 +00:00
vmm: Notify the guest about vCPUs being paused
Through the newly added API notify_guest_clock_paused(), this patch improves the vCPU pause operation by letting the guest know that each vCPU is being paused. This is important to avoid soft lockups detection from the guest that could happen because the VM has been paused for more than 20 seconds. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
309924eca8
commit
4a81d65f79
@ -1322,6 +1322,20 @@ impl Pausable for CpuManager {
|
||||
state.signal_thread();
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
for vcpu in self.vcpus.iter() {
|
||||
vcpu.lock()
|
||||
.unwrap()
|
||||
.fd
|
||||
.notify_guest_clock_paused()
|
||||
.map_err(|e| {
|
||||
MigratableError::Pause(anyhow!(
|
||||
"Could not notify guest it has been paused {:?}",
|
||||
e
|
||||
))
|
||||
})?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user