From: Gerd H. <kr...@re...> - 2008-04-21 13:01:23
|
Jeremy Fitzhardinge wrote: > Gerd Hoffmann wrote: >> +cycle_t pvclock_clocksource_read(struct kvm_vcpu_time_info *src) >> +{ >> + struct pvclock_shadow_time *shadow = &get_cpu_var(shadow_time); >> + cycle_t ret; >> + >> + pvclock_get_time_values(shadow, src); >> + ret = shadow->system_timestamp + pvclock_get_nsec_offset(shadow); >> > > You need to put this in a loop in case the system clock parameters > change between the pvclock_get_time_values() and pvclock_get_nsec_offset(). Fixed, new patch attached. > How does kvm deal with suspend/resume with respect to time? Is the > "system" timestamp guaranteed to remain monotonic? For Xen, I think > we'll need to maintain an offset between the initial system timestamp > and whatever it is after resuming. Havn't looked at it yet. cheers, Gerd -- http://kraxel.fedorapeople.org/xenner/ |