From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomasz Wroblewski Subject: Re: TSC trouble in hvm linux, after host S3 Date: Wed, 20 Nov 2013 12:55:15 +0100 Message-ID: <528CA323.9040604@citrix.com> References: <528C95AE.6040308@citrix.com> <528C9FF0.2050706@citrix.com> <528CB0510200007800104FC0@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Vj6NZ-0000Q7-At for xen-devel@lists.xenproject.org; Wed, 20 Nov 2013 11:55:33 +0000 In-Reply-To: <528CB0510200007800104FC0@nat28.tlf.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: xen-devel List-Id: xen-devel@lists.xenproject.org On 11/20/2013 12:51 PM, Jan Beulich wrote: >>>> On 20.11.13 at 12:41, Tomasz Wroblewski wrote: >> I've since found out that VMCS seems to provide tsc offsetting capabilities; >> adding something like >> >> for_each_vcpu ( d, v ) >> { >> if (v->vcpu_id == 0) >> hvm_set_guest_tsc(v, 0); >> } >> >> inside hvm_s3_resume (xen/arch/x86/hvm/hvm.c) fixed this for me; any comment >> on such a solution? > > This sounds plausible, but I'd prefer it to be done alongside the other > state resetting done for S3 (which all happen in hvm_s3_suspend()). > Unless that doesn't work, of course. > All right, thanks! I'll try it out and post a patch, I think it should work. I've only reset the tsc on vcpu 0 since I've noticed same is done in hvm_vcpu_initialize(), is that enough? > Jan >