KVM: x86: Use the correct vcpu's TSC rate to compute time scale
authorHaozhong Zhang <haozhong.zhang@intel.com>
Tue, 20 Oct 2015 07:39:08 +0000 (15:39 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Nov 2015 11:06:18 +0000 (12:06 +0100)
commit27cca94e032c1749825fdd9b6b379e4235cd52e1
treeab4c1deff2a494fcb2a51a00851f2bb4e70d84f0
parent4ba76538dd52dd9b18b464e509cb8f3ed4ed993f
KVM: x86: Use the correct vcpu's TSC rate to compute time scale

This patch makes KVM use virtual_tsc_khz rather than the host TSC rate
as vcpu's TSC rate to compute the time scale if TSC scaling is enabled.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c