From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: Re: [PATCH v4 01/10] x86/hvm: Scale host TSC when setting/getting guest TSC Date: Tue, 19 Jan 2016 08:17:57 +0800 Message-ID: <20160119001757.GD3528@hz-desktop.sh.intel.com> References: <1453067939-9121-1-git-send-email-haozhong.zhang@intel.com> <1453067939-9121-2-git-send-email-haozhong.zhang@intel.com> <569CF90902000078000C807A@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: <569CF90902000078000C807A@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 01/18/16 06:39, Jan Beulich wrote: > >>> On 17.01.16 at 22:58, wrote: > > The existing hvm_[set|get]_guest_tsc_fixed() calculate the guest TSC by > > adding the TSC offset to the host TSC. When the TSC scaling is enabled, > > the host TSC should be scaled first. This patch adds the scaling logic > > to those two functions. > > > > Reviewed-by: Boris Ostrovsky > > Signed-off-by: Haozhong Zhang > > --- > > Changes in v4: > > (addressing Jan Beulich's comments) > > * Remove redundant check of cpu_has_tsc_ratio in svm_scale_tsc(). > > This would better have caused Boris' R-b tag to get dropped, or > at least I don't recall him having offered it to stay despite the > change. Boris - can you confirm one way or the other? > > > * Move check of d->arch.vtsc in svm_scale_tsc() to callers. > > No d->arch.vtsc instances appear anywhere in this patch, so the > wording is confusing. Indeed the two callers already check this (or > really sit on suitable "else" paths), so at least the patch is correct. > Sorry for the confusion. It should be "Remove check of d->arch.vtsc in svm_scale_tsc() as it has been checked by callers." Haozhong