From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH 3/6] KVM: X86: Make tsc_delta calculation a function of guest tsc Date: Sun, 17 Apr 2011 14:06:56 +0200 Message-ID: <20110417120656.GT18463@8bytes.org> References: <1301042691-22929-1-git-send-email-joerg.roedel@amd.com> <1301042691-22929-4-git-send-email-joerg.roedel@amd.com> <4DA9BF2D.7010804@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Joerg Roedel , Avi Kivity , Marcelo Tosatti , Zachary Amsden , kvm@vger.kernel.org To: Jan Kiszka Return-path: Received: from 8bytes.org ([88.198.83.132]:53086 "EHLO 8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759559Ab1DQMG5 (ORCPT ); Sun, 17 Apr 2011 08:06:57 -0400 Content-Disposition: inline In-Reply-To: <4DA9BF2D.7010804@web.de> Sender: kvm-owner@vger.kernel.org List-ID: On Sat, Apr 16, 2011 at 06:09:17PM +0200, Jan Kiszka wrote: > On 2011-03-25 09:44, Joerg Roedel wrote: > > + tsc_delta = !vcpu->arch.last_guest_tsc ? 0 : > > + tsc - vcpu->arch.last_guest_tsc; > This patch appears to cause troubles to Linux guests on TSC clocksource > and APIC highres timer. The first boot after qemu start is always fine, > but after a reboot the guest timer appears to fire incorrectly or even > not at all. > > Was this patch tested with a guest reboot scenario as well? Does it > account for the TSC being reset to 0 on reboot? Hmm, probably the last_guest_tsc is not updated correctly in this scenario. I will have a look tomorrow. Joerg