From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: xen tsc problems? Date: Tue, 13 Jul 2010 19:12:01 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Stefano Stabellini , Dan Magenheimer Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 13/07/2010 18:48, "Keir Fraser" wrote: >> I started to wonder why the guest is seeing such a big tsc warp when xen >> is seeing 0, so I added more tracing and eventually I found out that the >> value of v->arch.hvm_vcpu.stime_offset is significantly different >> between the two vcpus and the difference increases after the scaling. >> Then I added timer_mode=1 to my vm config file and the problem went >> away. >> I think that delay_for_missed_ticks shouldn't cause tsc scew in >> the guest. > > Well, timer_mode=1 is the default and I doubt in all seriousness that the > other modes get any use or testing. To give you an idea how long it's probably been broken, my suspicion is that the culprit is xen-unstable:17716, which is over two years old. That patch changed HVM time handling to base it more on Xen system time. The fact that hvm_set_guest_time() no longer directly affects guest TSC is probably the problem here. I think delay_for_missed_ticks might depend on that. Anyway, I'm not certain but I'd put money on it. -- Keir