From mboxrd@z Thu Jan 1 00:00:00 1970 From: Haozhong Zhang Subject: Re: [PATCH v3 12/13] vmx: Add VMX RDTSC(P) scaling support Date: Thu, 14 Jan 2016 12:52:47 +0800 Message-ID: <20160114045247.GA3528@hz-desktop.sh.intel.com> References: <1451531020-29964-1-git-send-email-haozhong.zhang@intel.com> <1451531020-29964-13-git-send-email-haozhong.zhang@intel.com> <56953C5402000078000C60C3@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: <56953C5402000078000C60C3@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/12/16 09:48, Jan Beulich wrote: > >>> On 31.12.15 at 04:03, wrote: > > @@ -2003,6 +2011,10 @@ static struct hvm_function_table __initdata vmx_function_table = { > > .altp2m_vcpu_update_vmfunc_ve = vmx_vcpu_update_vmfunc_ve, > > .altp2m_vcpu_emulate_ve = vmx_vcpu_emulate_ve, > > .altp2m_vcpu_emulate_vmfunc = vmx_vcpu_emulate_vmfunc, > > + .default_tsc_scaling_ratio = VMX_TSC_MULTIPLIER_DEFAULT, > > + .max_tsc_scaling_ratio = VMX_TSC_MULTIPLIER_MAX, > > + .tsc_scaling_ratio_frac_bits = 48, > > + .setup_tsc_scaling = vmx_setup_tsc_scaling, > > }; > > > > /* Handle VT-d posted-interrupt when VCPU is running. */ > > @@ -2107,6 +2119,9 @@ const struct hvm_function_table * __init start_vmx(void) > > && cpu_has_vmx_secondary_exec_control ) > > vmx_function_table.pvh_supported = 1; > > > > + if ( cpu_has_vmx_tsc_scaling ) > > + vmx_function_table.tsc_scaling_supported = 1; > > Do you actually still need this separate flag field? I.e. can't you > derive this from one of the other four fields? > Yes, unless other four fields are set conditionally instead of being hardcoded in hvm_funcs. Haozhong > Jan >