From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH] x86/pvclock-xen: zero last_value on resume Date: Tue, 26 Oct 2010 15:48:54 -0200 Message-ID: <1288115334.3530.7.camel@mothafucka.localdomain> References: <4CC708DE.1070000@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: "Xen-devel@lists.xensource.com" , kvm-devel , Eelco Dolstra , the arch/x86 maintainers , Linux Kernel Mailing List , Linux Virtualization , Olivier Hanesse , Avi Kivity , "H. Peter Anvin" To: Jeremy Fitzhardinge Return-path: In-Reply-To: <4CC708DE.1070000@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com List-Id: kvm.vger.kernel.org On Tue, 2010-10-26 at 09:59 -0700, Jeremy Fitzhardinge wrote: > > If the guest domain has been suspend/resumed or migrated, then the > system clock backing the pvclock clocksource may revert to a smaller > value (ie, can be non-monotonic across the migration/save-restore). > Make sure we zero last_value in that case so that the domain > continues to see clock updates. > > [ I don't know if kvm needs an analogous fix or not. ] After migration, save/restore, etc, we issue an ioctl where we tell the host the last clock value. That (in theory) guarantees monotonicity. I am not opposed to this patch in any way, however.