diff --git a/vmm/src/cpu.rs b/vmm/src/cpu.rs index f8fff2b29..4b15cffc3 100644 --- a/vmm/src/cpu.rs +++ b/vmm/src/cpu.rs @@ -2637,16 +2637,16 @@ impl Pausable for CpuManager { self.signal_vcpus() .map_err(|e| MigratableError::Pause(anyhow!("Error signalling vCPUs: {e}")))?; + // Notify all guests (including Hyper-V / Windows) that the clock was + // paused. KVM_KVMCLOCK_CTRL updates internal KVM state that affects + // both pvclock (Linux) and the Hyper-V TSC reference page, so it must + // be called unconditionally. #[cfg(all(feature = "kvm", target_arch = "x86_64"))] for vcpu in self.vcpus.iter() { let vcpu = vcpu.lock().unwrap(); - if !self.config.kvm_hyperv { - vcpu.vcpu.notify_guest_clock_paused().map_err(|e| { - MigratableError::Pause(anyhow!( - "Could not notify guest it has been paused {e:?}" - )) - })?; - } + vcpu.vcpu.notify_guest_clock_paused().map_err(|e| { + MigratableError::Pause(anyhow!("Could not notify guest it has been paused {e:?}")) + })?; } // The vCPU thread will change its paused state before parking, wait here for each