From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: kvmclock doesn't work, help? Date: Tue, 15 Dec 2015 09:42:04 +0100 Message-ID: <566FD25C.5040806@redhat.com> References: <20151210213212.GA4836@amt.cnet> <566EC7AF.3090508@redhat.com> <20151214220027.GA24973@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: kvm list , Radim Krcmar , X86 ML To: Andy Lutomirski , Marcelo Tosatti Return-path: Received: from mail-wm0-f53.google.com ([74.125.82.53]:33935 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261AbbLOImJ (ORCPT ); Tue, 15 Dec 2015 03:42:09 -0500 Received: by mail-wm0-f53.google.com with SMTP id p66so98661015wmp.1 for ; Tue, 15 Dec 2015 00:42:08 -0800 (PST) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 14/12/2015 23:31, Andy Lutomirski wrote: > > RAW TSC NTP corrected TSC > > t0 10 10 > > t1 20 19.99 > > t2 30 29.98 > > t3 40 39.97 > > t4 50 49.96 > > > > ... > > > > if you suddenly switch from RAW TSC to NTP corrected TSC, > > you can see what will happen. > > Sure, but why would you ever switch from one to the other? The guest uses the raw TSC and systemtime = 0 until suspend. After resume, the TSC certainly increases at the same rate as before, but the raw TSC restarted counting from 0 and systemtime has increased slower than the guest kvmclock. Paolo > The only things that need to be monotonic are the output from > vread_pvclock and the in-kernel equivalent, I think.