diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-02-04 17:52:04 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-03-24 11:03:09 +0200 |
commit | c807660407a695f390034e402edfe544a1d2e40c (patch) | |
tree | f362e26ed5aee6458a0f84aa60f52dfb4ea6437e /include/linux/kvm_host.h | |
parent | 49cd7d2238e44f7ee4269481cd8a1261cc8f93a5 (diff) | |
download | lwn-c807660407a695f390034e402edfe544a1d2e40c.tar.gz lwn-c807660407a695f390034e402edfe544a1d2e40c.zip |
KVM: Fix kvmclock on !constant_tsc boxes
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>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 339eda3ca6ee..18b4df8264cf 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -37,6 +37,7 @@ #define KVM_REQ_PENDING_TIMER 5 #define KVM_REQ_UNHALT 6 #define KVM_REQ_MMU_SYNC 7 +#define KVM_REQ_KVMCLOCK_UPDATE 8 #define KVM_USERSPACE_IRQ_SOURCE_ID 0 |