]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - arch/x86/kvm/vmx.c
KVM: x86: Move TSC scaling logic out of call-back adjust_tsc_offset()
authorHaozhong Zhang <haozhong.zhang@intel.com>
Tue, 20 Oct 2015 07:39:06 +0000 (15:39 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 10 Nov 2015 11:06:17 +0000 (12:06 +0100)
commit58ea6767874e791a6c4f5c96c7d9155de4b1af28
tree058eacbf7c7c3a58d8ba69ea6f82441419444715
parent07c1419a32bbba08cf1efb6d1ecaf24f174fa4c3
KVM: x86: Move TSC scaling logic out of call-back adjust_tsc_offset()

For both VMX and SVM, if the 2nd argument of call-back
adjust_tsc_offset() is the host TSC, then adjust_tsc_offset() will scale
it first. This patch moves this common TSC scaling logic to its caller
adjust_tsc_offset_host() and rename the call-back adjust_tsc_offset() to
adjust_tsc_offset_guest().

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