mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-07-04 17:02:36 +00:00
vmm: don't call notify_guest_clock_paused when Hyper-V emulation is on
We turn on that emulation for Windows. Windows does not have KVM's PV clock, so calling notify_guest_clock_paused results in an error. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
0c967e1aa0
commit
d667ed0c70
|
@ -1357,9 +1357,14 @@ impl Pausable for CpuManager {
|
||||||
let mut vcpu = vcpu.lock().unwrap();
|
let mut vcpu = vcpu.lock().unwrap();
|
||||||
vcpu.pause()?;
|
vcpu.pause()?;
|
||||||
#[cfg(target_arch = "x86_64")]
|
#[cfg(target_arch = "x86_64")]
|
||||||
vcpu.vcpu.notify_guest_clock_paused().map_err(|e| {
|
if !self.config.kvm_hyperv {
|
||||||
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
|
||||||
|
))
|
||||||
|
})?;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user