]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
KVM: x86: make backwards_tsc_observed a per-VM variable
authorLadi Prosek <lprosek@redhat.com>
Mon, 26 Jun 2017 07:56:43 +0000 (09:56 +0200)
committerRadim Krčmář <rkrcmar@redhat.com>
Thu, 13 Jul 2017 15:25:39 +0000 (17:25 +0200)
commita826faf108e2d855929342268e68c43ba667379a
tree1ff5da7c983841535db6088b05facbbfba7c876e
parent286de8f6ac9202f1c9012784639156c6ec386eb8
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>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c