linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 0/3] vdso: Unbreak VDSO with PV and HyperV clocksources
@ 2020-06-06 21:51 Thomas Gleixner
  2020-06-06 21:51 ` [patch 1/3] clocksource: Remove obsolete ifdef Thomas Gleixner
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Thomas Gleixner @ 2020-06-06 21:51 UTC (permalink / raw)
  To: LKML
  Cc: Miklos Szeredi, x86, Vincenzo Frascino, Andy Lutomirski,
	Paolo Bonzini, Juergen Gross, Christophe Leroy

Miklos reported [1] that the recent VDSO changes broke paravirt clocksource
based VDSO in the case that the clocksource is invalidated by the
hypervisor which happens after a suspend/resume cycle of the host.

The result is a stale clocksource which is about 2200 seconds ahead of the
actual time and jumps forward by 2200 seconds once 2200 seconds have
elapsed.

The reason for this is the core code change which optimized the VDSO
clocksource validation by checking for the clocksource mode instead of
using the rather subtle check for the clocksource read return value whether
it has bit 63 set.

For some reason my brain blanked when doing that change, even if I should
have known better.

The following series restores the previous behaviour but preserves the
initially intended optimization for architectures which don't need that PV
handling.

Thanks,

	tglx

[1] https://lore.kernel.org/r/CAJfpegstNYeseo_C4KOF9Y74qRxr78x2tK-9rTgmYM4CK30nRQ@mail.gmail.com

8<-----------------
 arch/x86/include/asm/vdso/gettimeofday.h |   18 ++++++++++++++++++
 kernel/time/clocksource.c                |    2 --
 lib/vdso/gettimeofday.c                  |   19 +++++++++++++++++++
 3 files changed, 37 insertions(+), 2 deletions(-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-09 14:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-06 21:51 [patch 0/3] vdso: Unbreak VDSO with PV and HyperV clocksources Thomas Gleixner
2020-06-06 21:51 ` [patch 1/3] clocksource: Remove obsolete ifdef Thomas Gleixner
2020-06-09 14:40   ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner
2020-06-06 21:51 ` [patch 2/3] lib/vdso: Provide sanity check for cycles (again) Thomas Gleixner
2020-06-09 14:40   ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner
2020-06-06 21:51 ` [patch 3/3] x86/vdso: Unbreak paravirt VDSO clocks Thomas Gleixner
2020-06-09 14:40   ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner
2020-06-09 13:10 ` [patch 0/3] vdso: Unbreak VDSO with PV and HyperV clocksources Miklos Szeredi

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