From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: [PATCH v3 11/13] x86/hvm: Detect TSC scaling through hvm_funcs Date: Thu, 31 Dec 2015 11:03:38 +0800 Message-ID: <1451531020-29964-12-git-send-email-haozhong.zhang@intel.com> References: <1451531020-29964-1-git-send-email-haozhong.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1451531020-29964-1-git-send-email-haozhong.zhang@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org, Jan Beulich , Boris Ostrovsky , Kevin Tian Cc: Haozhong Zhang , Keir Fraser , Suravee Suthikulpanit , Andrew Cooper , Aravind Gopalakrishnan , Jun Nakajima List-Id: xen-devel@lists.xenproject.org This patch uses hvm_funcs.tsc_scaling_supported instead of the architecture code to detect the TSC scaling support. Signed-off-by: Haozhong Zhang Acked-by: Jan Beulich Reviewed-by: Kevin Tian Reviewed-by: Boris Ostrovsky --- xen/arch/x86/time.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 8d391e0..d14df13 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -37,7 +37,6 @@ #include #include #include /* for early_time_init */ -#include /* for cpu_has_tsc_ratio */ #include /* opt_clocksource: Force clocksource to one of: pit, hpet, acpi. */ @@ -815,7 +814,7 @@ static void __update_vcpu_system_time(struct vcpu *v, int force) } else { - if ( has_hvm_container_domain(d) && cpu_has_tsc_ratio ) + if ( has_hvm_container_domain(d) && hvm_funcs.tsc_scaling_supported ) { tsc_stamp = hvm_scale_tsc(v, t->local_tsc_stamp); _u.tsc_to_system_mul = d->arch.vtsc_to_ns.mul_frac; @@ -1758,7 +1757,7 @@ void tsc_get_info(struct domain *d, uint32_t *tsc_mode, uint32_t *incarnation) { bool_t enable_tsc_scaling = has_hvm_container_domain(d) && - cpu_has_tsc_ratio; + hvm_funcs.tsc_scaling_supported; *incarnation = d->arch.incarnation; *tsc_mode = d->arch.tsc_mode; -- 2.4.8