From: "Zhang, Haozhong" Subject: Re: [PATCH v2 08/14] x86/hvm: Collect information of TSC scaling ratio Date: Thu, 10 Dec 2015 18:27:07 +0800 Message-ID: <20151210102707.GM3547@hz-desktop.sh.intel.com> References: <1449435529-12989-1-git-send-email-haozhong.zhang@intel.com> <1449435529-12989-9-git-send-email-haozhong.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Tian, Kevin" Cc: Keir Fraser , Jan Beulich , "Nakajima, Jun" , Andrew Cooper , "xen-devel@lists.xen.org" , Aravind Gopalakrishnan , Suravee Suthikulpanit , Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org On 12/10/15 18:19, Tian, Kevin wrote: > > From: Zhang, Haozhong > > Sent: Monday, December 07, 2015 4:59 AM > ratio > > > > 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: Kevin Tian , with one comment > > > > diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h > > index aba63ab..8b10a67 100644 > > --- a/xen/include/asm-x86/hvm/hvm.h > > +++ b/xen/include/asm-x86/hvm/hvm.h > > @@ -100,6 +100,18 @@ struct hvm_function_table { > > unsigned int hap_capabilities; > > > > /* > > + * Parameters of hardware-assisted TSC scaling. > > + */ > > + /* is TSC scaling supported? */ > > + bool_t tsc_scaling_supported; > > + /* number of bits of the fractional part of TSC scaling ratio */ > > + uint8_t tsc_scaling_ratio_frac_bits; > > + /* default TSC scaling ratio (no scaling) */ > > + uint64_t default_tsc_scaling_ratio; > > + /* maxmimum-allowed TSC scaling ratio */ > > maxmimum -> maximum will fix in the next version Thanks, Haozhong > > > + uint64_t max_tsc_scaling_ratio; > > + > > + /* > > * Initialise/destroy HVM domain/vcpu resources > > */ > > int (*domain_initialise)(struct domain *d); > > -- > > 2.6.3 >