mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +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:
@@ -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(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user