diff options
author | Zachary Amsden <zamsden@redhat.com> | 2010-08-19 22:07:20 -1000 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-10-24 10:51:22 +0200 |
commit | f38e098ff3a315bb74abbb4a35cba11bbea8e2fa (patch) | |
tree | 22b605d3984c20456cfdc7c4fe22883450da2141 /arch/x86/include/asm/kvm_host.h | |
parent | 99e3e30aee1a326a98bf3a5f47b8622219c685f3 (diff) |
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/asm/kvm_host.h')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 3 |
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; |