summaryrefslogtreecommitdiff
path: root/arch/x86/include
diff options
context:
space:
mode:
authorZachary Amsden <zamsden@redhat.com>2010-08-20 12:07:20 +0400
committerAvi Kivity <avi@redhat.com>2010-10-24 12:51:22 +0400
commitf38e098ff3a315bb74abbb4a35cba11bbea8e2fa (patch)
tree22b605d3984c20456cfdc7c4fe22883450da2141 /arch/x86/include
parent99e3e30aee1a326a98bf3a5f47b8622219c685f3 (diff)
downloadlinux-f38e098ff3a315bb74abbb4a35cba11bbea8e2fa.tar.xz
KVM: x86: TSC reset compensation
Attempt to synchronize TSCs which are reset to the same value. In the case of a reliable hardware TSC, we can just re-use the same offset, but on non-reliable hardware, we can get closer by adjusting the offset to match the elapsed time. Signed-off-by: Zachary Amsden <zamsden@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/kvm_host.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index a215153f1ff6..57b4394491ec 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -396,6 +396,9 @@ struct kvm_arch {
unsigned long irq_sources_bitmap;
s64 kvmclock_offset;
spinlock_t tsc_write_lock;
+ u64 last_tsc_nsec;
+ u64 last_tsc_offset;
+ u64 last_tsc_write;
struct kvm_xen_hvm_config xen_hvm_config;