KVM: Fix kvmclock on !constant_tsc boxes
authorGerd Hoffmann <kraxel@redhat.com>
Wed, 4 Feb 2009 16:52:04 +0000 (17:52 +0100)
committerAvi Kivity <avi@redhat.com>
Tue, 24 Mar 2009 09:03:09 +0000 (11:03 +0200)
kvmclock currently falls apart on machines without constant tsc.
This patch fixes it.  Changes:

  * keep tsc frequency in a per-cpu variable.
  * handle kvmclock update using a new request flag, thus checking
    whenever we need an update each time we enter guest context.
  * use a cpufreq notifier to track frequency changes and force
    kvmclock updates.
  * send ipis to kick cpu out of guest context if needed to make
    sure the guest doesn't see stale values.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>

No differences found