Re: [KVM timekeeping fixes 1/4] Fix kvmclock bug

From: Marcelo Tosatti
Date: Mon Sep 20 2010 - 11:42:12 EST


On Sat, Sep 18, 2010 at 02:38:12PM -1000, Zachary Amsden wrote:
> If preempted after kvmclock values are updated, but before hardware
> virtualization is entered, the last tsc time as read by the guest is
> never set. It underflows the next time kvmclock is updated if there
> has not yet been a successful entry / exit into hardware virt.
>
> Fix this by simply setting last_tsc to the newly read tsc value so
> that any computed nsec advance of kvmclock is nulled.
>
> Signed-off-by: Zachary Amsden <zamsden@xxxxxxxxxx>

Applied, thanks.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/