From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: [PATCH 08/13] x86/hvm: Detect TSC scaling through hvm_funcs in tsc_set_info() Date: Mon, 28 Sep 2015 15:13:53 +0800 Message-ID: <1443424438-13404-9-git-send-email-haozhong.zhang@intel.com> References: <1443424438-13404-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: <1443424438-13404-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 Cc: Haozhong Zhang , Kevin Tian , Wei Liu , Ian Campbell , Stefano Stabellini , Jun Nakajima , Andrew Cooper , Ian Jackson , Aravind Gopalakrishnan , Jan Beulich , Keir Fraser , Boris Ostrovsky , Suravee Suthikulpanit 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 --- xen/arch/x86/time.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 64f4e31..4b5402c 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. */ @@ -1951,7 +1950,7 @@ void tsc_set_info(struct domain *d, */ if ( tsc_mode == TSC_MODE_DEFAULT && host_tsc_is_safe() && (has_hvm_container_domain(d) ? - d->arch.tsc_khz == cpu_khz || cpu_has_tsc_ratio : + d->arch.tsc_khz == cpu_khz || hvm_funcs.tsc_scaling_supported : incarnation == 0) ) { case TSC_MODE_NEVER_EMULATE: -- 2.4.8