Skip to content
  • Ladi Prosek's avatar
    KVM: x86: make backwards_tsc_observed a per-VM variable · a826faf1
    Ladi Prosek authored
    The backwards_tsc_observed global introduced in commit 16a96021
    
     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: default avatarLadi Prosek <lprosek@redhat.com>
    Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
    a826faf1