From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v2] kvmclock: Ensure time in migration never goes backward Date: Sun, 18 May 2014 10:20:52 -0300 Message-ID: <20140518132052.GA22484@amt.cnet> References: <1400253321-9239-1-git-send-email-agraf@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, pbonzini@redhat.com To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:62372 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751043AbaERNVJ (ORCPT ); Sun, 18 May 2014 09:21:09 -0400 Content-Disposition: inline In-Reply-To: <1400253321-9239-1-git-send-email-agraf@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, May 16, 2014 at 05:15:21PM +0200, Alexander Graf wrote: > 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. > > While the underlying bug is supposedly fixed on newer KVM versions, it doesn't > hurt to base the view of the kvmclock after migration on the same foundation > in host as well as guest. Remove this last phrase from the changelog please, the underlying bug is not fixed on newer KVM versions. Otherwise Reviewed-by: Marcelo Tosatti