]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Add a common TSC scaling function
authorHaozhong Zhang <haozhong.zhang@intel.com>
Tue, 20 Oct 2015 07:39:03 +0000 (15:39 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Nov 2015 11:06:15 +0000 (12:06 +0100)
commitffbbfcf75a0aa20f068dd79294f5e22d76f59df2
treee7df6020aaf6649eb287aa5c75f3e6cc324d9347
parent111da69bda597b3a70aa404b78d36388fb918c1d
KVM: x86: Add a common TSC scaling function

VMX and SVM calculate the TSC scaling ratio in a similar logic, so this
patch generalizes it to a common TSC scaling function.

Signed-off-by: Haozhong Zhang <haozhong.zhang@intel.com>
[Inline the multiplication and shift steps into mul_u64_u64_shr.  Remove
 BUG_ON.  - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/x86.c
include/linux/kvm_host.h
include/linux/math64.h