From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH] kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use Date: Wed, 9 Nov 2016 18:17:19 -0200 Message-ID: <20161109201716.GB25974@amt.cnet> References: <1478710095-15022-1-git-send-email-pbonzini@redhat.com> <20161109201248.GA25974@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <20161109201248.GA25974@amt.cnet> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Wed, Nov 09, 2016 at 06:12:50PM -0200, Marcelo Tosatti wrote: > On Wed, Nov 09, 2016 at 05:48:15PM +0100, Paolo Bonzini wrote: > > Userspace can read the exact value of kvmclock by reading the TSC > > and fetching the timekeeping parameters out of guest memory. This > > however is brittle and not necessary anymore with KVM 4.11. > > Hi Paolo, > > Can you point to commit or explanation why that is not the case anymore? > Thanks I don't see how thats possible given the: * TSC * TSC (timer interrupt + TSC deltas) (AKA host TSC clocksource and * CLOCK_MONOTONIC). Clocks currently drift from each other (therefore are not monotonic). Have you confirmed CLOCK_MONOTONIC_RAW and TSC are monotonic?