File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -353,10 +353,13 @@ impl Vcpu {
353353 // does not panic on resume, see https://docs.kernel.org/virt/kvm/api.html .
354354 // We do not want to fail if the call is not successful, because depending
355355 // that may be acceptable depending on the workload.
356+ // TODO: once kvmclock is supported with Secret Fredom, remove this condition.
356357 #[ cfg( target_arch = "x86_64" ) ]
357- if let Err ( err) = self . kvm_vcpu . fd . kvmclock_ctrl ( ) {
358- METRICS . vcpu . kvmclock_ctrl_fails . inc ( ) ;
359- warn ! ( "KVM_KVMCLOCK_CTRL call failed {}" , err) ;
358+ if self . userfault_channel . is_none ( ) {
359+ if let Err ( err) = self . kvm_vcpu . fd . kvmclock_ctrl ( ) {
360+ METRICS . vcpu . kvmclock_ctrl_fails . inc ( ) ;
361+ warn ! ( "KVM_KVMCLOCK_CTRL call failed {}" , err) ;
362+ }
360363 }
361364
362365 // Move to 'paused' state.
You can’t perform that action at this time.
0 commit comments