linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Radim Krcmar <rkrcmar@redhat.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Miroslav Lichvar <mlichvar@redhat.com>
Subject: [patch 0/4] KVM virtual PTP driver (v5)
Date: Tue, 24 Jan 2017 15:09:38 -0200	[thread overview]
Message-ID: <20170124170938.909652059@redhat.com> (raw)


This patchset implements a virtual PTP driver which allows guest to sync
its clock to the host clock with high precision
(error is < 1us on an idle guest).

Changelog from v4

Drop PTP_SYS_OFFSET emulation via ->crosstimestamp callback (Richard).
Emulate ->gettime directly without TSC offset (Radim).

Changelog from v3

Patch3:

v2: export kvmclock clocksource structure directly (Paolo)

Patch4:

v2: drop timekeeper spinlock, move back to drivers/ptp/ptp_chardev.c (Paolo)
    ptp_clock_gettime: support drivers with crosstimestamp but not
    gettime64 callbacks (Paolo)

Patch5:

v4: remove gettime64 callback (Paolo)

Changelog from v2

Cross timestamping, emulation of PTP_SYS_OFFSET with cross timestamping
(Paolo, Miroslav, Radim).

Changelog from v1

Patch1:

v2: unify nsec_base (Radim)

Patch2:
v2: improve documentation (Radim)
    change hypercall name to KVM_HC_CLOCK_PAIRING (Radim)
    increase padding size

Patch3:
v2: check for kvmclock (Radim)
    initialize global variables before device registration (Radim)


30 second output of a idle guest:


210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     9     -1ns[   -1ns] +/-    2ns
Tue Jan 24 11:46:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     7     -0ns[   -1ns] +/-    2ns
Tue Jan 24 11:47:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     5     -1ns[   +0ns] +/-    2ns
Tue Jan 24 11:47:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377    11     +0ns[   -2ns] +/-    2ns
Tue Jan 24 11:48:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377    10     -0ns[   -0ns] +/-    2ns
Tue Jan 24 11:48:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     7     -0ns[   -0ns] +/-    2ns
Tue Jan 24 11:49:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     5     -3ns[   -4ns] +/-    2ns
Tue Jan 24 11:49:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377    11     +2ns[   +2ns] +/-    2ns
Tue Jan 24 11:50:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     9     -1ns[   +1ns] +/-    2ns
Tue Jan 24 11:50:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     6     +0ns[   +0ns] +/-    2ns
Tue Jan 24 11:51:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     5     +1ns[  +10ns] +/-    2ns
Tue Jan 24 11:51:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377    11     -5ns[   -6ns] +/-    2ns
Tue Jan 24 11:52:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     9     -0ns[   -1ns] +/-    2ns
Tue Jan 24 11:52:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     6     +0ns[   -5ns] +/-    2ns
Tue Jan 24 11:53:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     4     -0ns[   -0ns] +/-    2ns
Tue Jan 24 11:53:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377    10     -0ns[   -0ns] +/-    2ns
Tue Jan 24 11:54:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     9     -1ns[   -1ns] +/-    2ns
Tue Jan 24 11:54:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     6     -1ns[   -2ns] +/-    2ns
Tue Jan 24 11:55:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     4     -0ns[   +3ns] +/-    2ns
Tue Jan 24 11:55:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377    10     -3ns[   -6ns] +/-    2ns
Tue Jan 24 11:56:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     8     +2ns[   +3ns] +/-    2ns
Tue Jan 24 11:56:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     6     +0ns[   -2ns] +/-    2ns
Tue Jan 24 11:57:06 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377     4     -0ns[   +1ns] +/-    2ns
Tue Jan 24 11:57:36 EST 2017
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
#* PHC0                          0   3   377    10     -1ns[   +1ns] +/-    2ns

             reply	other threads:[~2017-01-24 17:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 17:09 Marcelo Tosatti [this message]
2017-01-24 17:09 ` [patch 1/4] KVM: x86: provide realtime host clock via vsyscall notifiers Marcelo Tosatti
2017-01-25 12:30   ` Paolo Bonzini
2017-01-24 17:09 ` [patch 2/4] KVM: x86: add KVM_HC_CLOCK_OFFSET hypercall Marcelo Tosatti
2017-01-25 12:30   ` Paolo Bonzini
2017-01-25 12:55     ` Marcelo Tosatti
2017-01-25 12:59       ` Paolo Bonzini
2017-01-25 13:06         ` Marcelo Tosatti
2017-01-25 13:15           ` Paolo Bonzini
2017-01-24 17:09 ` [patch 3/4] kvmclock: export kvmclock clocksource pointer Marcelo Tosatti
2017-01-24 17:09 ` [patch 4/4] PTP: add kvm PTP driver Marcelo Tosatti
2017-01-24 18:11   ` Richard Cochran
2017-01-25 12:56   ` Paolo Bonzini
2017-01-25 13:03     ` Marcelo Tosatti

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=20170124170938.909652059@redhat.com \
    --to=mtosatti@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlichvar@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=richardcochran@gmail.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).