From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: Re: [PATCH v5 1/6] x86/hvm: Collect information of TSC scaling ratio Date: Wed, 24 Feb 2016 23:03:53 +0800 Message-ID: <20160224150353.GA14964@hz-desktop.sh.intel.com> References: <1456193104-12761-1-git-send-email-haozhong.zhang@intel.com> <1456193104-12761-2-git-send-email-haozhong.zhang@intel.com> <56CDCE0302000078000D5B93@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <56CDCE0302000078000D5B93@prv-mh.provo.novell.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: Jan Beulich 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 02/24/16 07:36, Jan Beulich wrote: > >>> 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. > The callback scale_tsc() is later dropped in patch 3. If a new version of this patch series is needed, I'll make the adjustment then. Otherwise, I would like to leave it as is. Thanks, Haozhong