diff options
author | Ladi Prosek <lprosek@redhat.com> | 2017-06-26 09:56:43 +0200 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2017-07-13 17:25:39 +0200 |
commit | a826faf108e2d855929342268e68c43ba667379a (patch) | |
tree | 1ff5da7c983841535db6088b05facbbfba7c876e /arch/x86/include | |
parent | 286de8f6ac9202f1c9012784639156c6ec386eb8 (diff) | |
download | linux-a826faf108e2d855929342268e68c43ba667379a.tar.bz2 |
KVM: x86: make backwards_tsc_observed a per-VM variable
The backwards_tsc_observed global introduced in commit 16a9602 is never
reset to false. If a VM happens to be running while the host is suspended
(a common source of the TSC jumping backwards), master clock will never
be enabled again for any VM. In contrast, if no VM is running while the
host is suspended, master clock is unaffected. This is inconsistent and
unnecessarily strict. Let's track the backwards_tsc_observed variable
separately and let each VM start with a clean slate.
Real world impact: My Windows VMs get slower after my laptop undergoes a
suspend/resume cycle. The only way to get the perf back is unloading and
reloading the kvm module.
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index 1588e9e3dc01..ef37d0dc61bd 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -803,6 +803,7 @@ struct kvm_arch { int audit_point; #endif + bool backwards_tsc_observed; bool boot_vcpu_runs_old_kvmclock; u32 bsp_vcpu_id; |