KVM: x86: Hyper-V tsc page setup
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 8 Feb 2016 11:54:12 +0000 (12:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 20 Sep 2016 07:26:20 +0000 (09:26 +0200)
commit095cf55df715d14d5dad75326faf5984e7fc0b3a
tree6cb5516b7594b4aaf1208b6dae4d9a1cefa9be15
parent108b249c453dd7132599ab6dc7e435a7036c193f
KVM: x86: Hyper-V tsc page setup

Lately tsc page was implemented but filled with empty
values. This patch setup tsc page scale and offset based
on vcpu tsc, tsc_khz and  HV_X64_MSR_TIME_REF_COUNT value.

The valid tsc page drops HV_X64_MSR_TIME_REF_COUNT msr
reads count to zero which potentially improves performance.

Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Peter Hornyack <peterhornyack@google.com>
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
[Computation of TSC page parameters rewritten to use the Linux timekeeper
 parameters. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/hyperv.c
arch/x86/kvm/hyperv.h
arch/x86/kvm/x86.c