Re: [PATCH 15/35] KVM: allow userspace to adjust kvmclock offset

Alexander Graf
2010-01-29T13:32:45Z

On 19.11.2009, at 14:34, Avi Kivity wrote:

> From: Glauber Costa <glommer@redhat.com>
>
> When we migrate a kvm guest that uses pvclock between two hosts, we may
> suffer a large skew. This is because there can be significant differences
> between the monotonic clock of the hosts involved. When a new host with
> a much larger monotonic time starts running the guest, the view of time
> will be significantly impacted.
>
> Situation is much worse when we do the opposite, and migrate to a host with
> a smaller monotonic clock.
>
> This proposed ioctl will allow userspace to inform us what is the monotonic
> clock value in the source host, so we can keep the time skew short, and
> more importantly, never goes backwards. Userspace may also need to trigger
> the current data, since from the first migration onwards, it won't be
> reflected by a simple call to clock_gettime() anymore.

So I assume without this feature there's no way to have a reliable kvmclock inside the guest? Isn't it stable material then?

Alex