From: Gerd H. <kr...@re...> - 2008-04-11 15:01:34
|
Gerd Hoffmann wrote: > Wall clock is off a few hours though. Oops. > > I think the way wall clock and system clock work together in xen (Jeremy > correct me if I'm wrong) is that the wall clock specifies the point in > time where the system clock started going. As kvm fills in host system > time into the guest system time fields the guest wall clock fields > should be filled with the host boot time timestamp I'd say. Following up myself with a quick&dirty patch to tackle this issue too. This one calculates the boot time. That should be solveable better, include/linux/time.h lists two functions which sound promising: extern void getboottime(struct timespec *ts); extern void monotonic_to_bootbased(struct timespec *ts); Neither of them is available to modules though, so I can't test without rebooting my laptop ... monotonic_to_bootbased() sounds like we would get hosts ntp adjustments in the guests for free. cheers, Gerd -- http://kraxel.fedorapeople.org/xenner/ |