From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v5 1/6] x86/hvm: Collect information of TSC scaling ratio Date: Wed, 24 Feb 2016 07:36:35 -0700 Message-ID: <56CDCE0302000078000D5B93@prv-mh.provo.novell.com> References: <1456193104-12761-1-git-send-email-haozhong.zhang@intel.com> <1456193104-12761-2-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: <1456193104-12761-2-git-send-email-haozhong.zhang@intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Haozhong Zhang Cc: Kevin Tian , Keir Fraser , Suravee Suthikulpanit , Andrew Cooper , xen-devel@lists.xen.org, Aravind Gopalakrishnan , Jun Nakajima , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org >>> On 23.02.16 at 03:04, wrote: > Both VMX TSC scaling and SVM TSC ratio use the 64-bit TSC scaling ratio, > but the number of fractional bits of the ratio is different between VMX > and SVM. This patch adds the architecture code to collect the number of > fractional bits and other related information into fields of struct > hvm_function_table so that they can be used in the common code. > > Signed-off-by: Haozhong Zhang Reviewed-by: Jan Beulich albeit I would have wished ... > @@ -312,8 +311,8 @@ void hvm_set_guest_tsc_fixed(struct vcpu *v, u64 guest_tsc, u64 at_tsc) > else > { > tsc = at_tsc ?: rdtsc(); > - if ( cpu_has_tsc_ratio ) > - tsc = hvm_funcs.scale_tsc(v, tsc); > + if ( hvm_tsc_scaling_supported ) > + tsc = hvm_funcs.tsc_scaling.scale_tsc(v, tsc); ... for these to get their redundancy reduced, .e.g tsc = hvm_funcs.tsc_scaling.scale(v, tsc); The R-b may be retained if you elect to make that adjustment. Jan