From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH v4 2/3] x86/svn: Enable TSC scaling Date: Wed, 16 Apr 2014 11:53:56 +0100 Message-ID: <534E6144.1010709@citrix.com> References: <1397611668-15338-1-git-send-email-boris.ostrovsky@oracle.com> <1397611668-15338-3-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397611668-15338-3-git-send-email-boris.ostrovsky@oracle.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: Boris Ostrovsky Cc: kevin.tian@intel.com, jbeulich@suse.com, eddie.dong@intel.com, xen-devel@lists.xen.org, jun.nakajima@intel.com, suravee.suthikulpanit@amd.com List-Id: xen-devel@lists.xenproject.org On 16/04/14 02:27, Boris Ostrovsky wrote: > TSC ratio enabling logic is inverted: we want to use it when we > are running in native tsc mode, i.e. when d->arch.vtsc is zero. > > Also, since now svm_set_tsc_offset()'s calculations depend > on vtsc's value, we need to call hvm_funcs.set_tsc_offset() after > vtsc changes in tsc_set_info(). > > In addition, with TSC ratio enabled, svm_set_tsc_offset() will > need to do rdtsc. With that we may end up having TSCs on guest's > processors out of sync. d->arch.hvm_domain.sync_tsc which is set > by the boot processor can now be used by APs as reference TSC > value instead of host's current TSC. > > Signed-off-by: Boris Ostrovsky "svm" in the subject? ~Andrew > --- > xen/arch/x86/hvm/hvm.c | 15 ++++++++++----- > xen/arch/x86/hvm/svm/svm.c | 15 +++++++++------ > xen/arch/x86/hvm/vmx/vmx.c | 2 +- > xen/arch/x86/hvm/vmx/vvmx.c | 4 ++-- > xen/arch/x86/hvm/vpt.c | 16 ++++++++++------ > xen/arch/x86/time.c | 29 +++++++++++++++++++++++++++-- > xen/include/asm-x86/hvm/domain.h | 6 ++++++ > xen/include/asm-x86/hvm/hvm.h | 8 +++++--- > xen/include/asm-x86/msr.h | 6 +++--- > xen/include/xen/time.h | 1 + > 10 files changed, 74 insertions(+), 28 deletions(-) > >