From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v2] make tsc stable over migration and machine start Date: Thu, 3 Feb 2011 14:00:25 -0200 Message-ID: <20110203160025.GA8092@amt.cnet> References: <1296648980-28883-1-git-send-email-glommer@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, avi@redhat.com, Jan Kiszka To: Glauber Costa Return-path: Received: from mx1.redhat.com ([209.132.183.28]:17022 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932067Ab1BCQFX (ORCPT ); Thu, 3 Feb 2011 11:05:23 -0500 Content-Disposition: inline In-Reply-To: <1296648980-28883-1-git-send-email-glommer@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Feb 02, 2011 at 07:16:20AM -0500, Glauber Costa wrote: > If the machine is stopped, we should not record two different tsc values > upon a save operation. The same problem happens with kvmclock. > > But kvmclock is taking a different diretion, being now seen as a separate > device. Since this is unlikely to happen with the tsc, I am taking the > approach here of simply registering a handler for state change, and > using a per-CPUState variable that prevents double updates for the TSC. > > Signed-off-by: Glauber Costa > CC: Jan Kiszka > > --- > v2: updated tsc validation logic, as asked by Jan > --- > target-i386/cpu.h | 1 + > target-i386/kvm.c | 18 +++++++++++++++++- > 2 files changed, 18 insertions(+), 1 deletions(-) Please regenerate against uq/master.