From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRN6M-0006jj-K2 for qemu-devel@nongnu.org; Tue, 09 Sep 2014 11:13:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRN6E-0004Y8-1g for qemu-devel@nongnu.org; Tue, 09 Sep 2014 11:13:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRN6D-0004Xr-P8 for qemu-devel@nongnu.org; Tue, 09 Sep 2014 11:12:53 -0400 Date: Tue, 9 Sep 2014 12:12:30 -0300 From: Marcelo Tosatti Message-ID: <20140909151230.GA3106@amt.cnet> References: <20140905135244.104423770@amt.cnet> <20140905135539.188955270@amt.cnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140905135539.188955270@amt.cnet> Subject: Re: [Qemu-devel] [patch 1/3] kvmclock: Ensure time in migration never goes backward List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Andrey Korolyov , Marcin =?iso-8859-1?Q?Gibu=C5=3Fa?= , Alexander Graf Ping? On Fri, Sep 05, 2014 at 10:52:45AM -0300, Marcelo Tosatti wrote: > From: Alexander Graf > > When we migrate we ask the kernel about its current belief on what the guest > time would be. However, I've seen cases where the kvmclock guest structure > indicates a time more recent than the kvm returned time. > > To make sure we never go backwards, calculate what the guest would have seen as time at the point of migration and use that value instead of the kernel returned one when it's more recent. > This bases the view of the kvmclock after migration on the > same foundation in host as well as guest. > > Signed-off-by: Alexander Graf > Cc: qemu-stable@nongnu.org > Reviewed-by: Marcelo Tosatti > Signed-off-by: Paolo Bonzini