From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=47252 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pl1gU-0004GC-Ka for qemu-devel@nongnu.org; Thu, 03 Feb 2011 11:05:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pl1gR-00085d-1U for qemu-devel@nongnu.org; Thu, 03 Feb 2011 11:05:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28275) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pl1gQ-000856-PK for qemu-devel@nongnu.org; Thu, 03 Feb 2011 11:05:23 -0500 Date: Thu, 3 Feb 2011 14:00:25 -0200 From: Marcelo Tosatti 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 Content-Disposition: inline In-Reply-To: <1296648980-28883-1-git-send-email-glommer@redhat.com> Subject: [Qemu-devel] Re: [PATCH v2] make tsc stable over migration and machine start List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glauber Costa Cc: Jan Kiszka , qemu-devel@nongnu.org, kvm@vger.kernel.org, avi@redhat.com 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.