Skip to content

KVM virtual PTP driver (v4)

Marcelo Tosatti kvm lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5KVM: x86: provide realtime host clock via vsyscall notifiersarch/x86/kvm/x86.c+36 -00 replies
2/5KVM: x86: add KVM_HC_CLOCK_OFFSET hypercallDocumentation/virtual/kvm/hypercalls.txt arch/x86/include/uapi/asm/kvm_para.h arch/x86/kvm/x86.c +1 more+86 -00 replies
3/5kvmclock: export kvmclock clocksource pointerarch/x86/include/asm/kvmclock.h arch/x86/kernel/kvmclock.c+8 -10 replies
4/5PTP: add PTP_SYS_OFFSET emulation via cross timestamps infrastructuredrivers/ptp/ptp_chardev.c drivers/ptp/ptp_clock.c+83 -00 replies
5/5PTP: add kvm PTP driverdrivers/ptp/Kconfig drivers/ptp/Makefile drivers/ptp/ptp_kvm.c+192 -00 replies
5/5PTP: add kvm PTP driver (v2)drivers/ptp/Kconfig drivers/ptp/Makefile drivers/ptp/ptp_kvm.c+190 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 0/5] KVM virtual PTP driver (v4)

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 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)

PHC0 0 3 377 7 -141ns[ +234ns] +/- 7ns

#* PHC0                          0   3   377     5   -197ns[ -403ns] +/-    3ns
#* PHC0                          0   3   377    11   +157ns[ +264ns] +/-    3ns
#* PHC0                          0   3   377     9    +92ns[ +304ns] +/-    2ns
#* PHC0                          0   3   377     7   -102ns[ -164ns] +/-    3ns
#* PHC0                          0   3   377     5   -157ns[ -269ns] +/-    2ns
#* PHC0                          0   3   377    10    -63ns[  -98ns] +/-    2ns
#* PHC0                          0   3   377     8   +351ns[ +399ns] +/-    2ns
#* PHC0                          0   3   377     6   +385ns[ +399ns] +/-    4ns
#* PHC0                          0   3   377     4   -133ns[ -110ns] +/-    6ns
#* PHC0                          0   3   377    10    -59ns[  -90ns] +/-    3ns
#* PHC0                          0   3   377     8    -90ns[ +381ns] +/-    9ns
#* PHC0                          0   3   377     6     +6ns[ +216ns] +/-    6ns
#* PHC0                          0   3   377     4   +166ns[ -666ns] +/-   11ns
#* PHC0                          0   3   377    10    -18ns[ +323ns] +/-   10ns
#* PHC0                          0   3   377     8    -12ns[ +121ns] +/-    5ns
#* PHC0                          0   3   377     5     +4ns[ +218ns] +/-    7ns
#* PHC0                          0   3   377     4   +162ns[ -683ns] +/-   11ns
#* PHC0                          0   3   377    10    -82ns[ +310ns] +/-   12ns
#* PHC0                          0   3   377     7     +5ns[ -320ns] +/-    9ns
#* PHC0                          0   3   377     5    -13ns[ +165ns] +/-    7ns
#* PHC0                          0   3   377     3     +6ns[ +105ns] +/-    2ns
#* PHC0                          0   3   377     9    -19ns[  -67ns] +/-    3ns
#* PHC0                          0   3   377     8    +89ns[ +181ns] +/-    3ns
#* PHC0                          0   3   377     6    +93ns[ +168ns] +/-    2ns
#* PHC0                          0   3   377     4   +100ns[ +154ns] +/-    2ns
#* PHC0                          0   3   377    10   -249ns[ +180ns] +/-    7ns
#* PHC0                          0   3   377     8   +158ns[ -582ns] +/-   22ns
#* PHC0                          0   3   377     6    +10ns[ +213ns] +/-    9ns
#* PHC0                          0   3   377     3    -35ns[ +258ns] +/-    5ns
#* PHC0                          0   3   377    10    +25ns[ -620ns] +/-    8ns
#* PHC0                          0   3   377     7    +13ns[ +153ns] +/-    2ns