From: Paolo Bonzini <pbonzini@redhat.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
"Radim Krčmář" <rkrcmar@redhat.com>
Subject: Re: [PATCH] kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use
Date: Wed, 9 Nov 2016 17:03:55 -0500 (EST) [thread overview]
Message-ID: <628483831.11762909.1478729035700.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20161109201716.GB25974@amt.cnet>
----- Original Message -----
> From: "Marcelo Tosatti" <mtosatti@redhat.com>
> To: "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, "Radim Krčmář" <rkrcmar@redhat.com>
> Sent: Wednesday, November 9, 2016 9:17:19 PM
> Subject: Re: [PATCH] kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use
>
> 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).
__get_kernel_ns now computes the guest's kvmclock directly when using the
master clock. Instead of peeking at guest memory, it does it from the
hypervisor's copy of the parameters.
Paolo
next prev parent reply other threads:[~2016-11-09 22:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 16:48 [PATCH] kvm: kvmclock: let KVM_GET_CLOCK return whether the master clock is in use Paolo Bonzini
2016-11-09 20:12 ` Marcelo Tosatti
2016-11-09 20:17 ` Marcelo Tosatti
2016-11-09 21:14 ` Marcelo Tosatti
2016-11-09 22:03 ` Paolo Bonzini [this message]
2016-11-09 21:43 ` Marcelo Tosatti
2016-11-19 19:34 ` Radim Krčmář
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=628483831.11762909.1478729035700.JavaMail.zimbra@redhat.com \
--to=pbonzini@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).