linux/arch/x86/xen
David Vrabel 47433b8c9d x86: xen: Sync the CMOS RTC as well as the Xen wallclock
Adjustments to Xen's persistent clock via update_persistent_clock()
don't actually persist, as the Xen wallclock is a software only clock
and modifications to it do not modify the underlying CMOS RTC.

The x86_platform.set_wallclock hook is there to keep the hardware RTC
synchronized. On a guest this is pointless.

On Dom0 we can use the native implementaion which actually updates the
hardware RTC, but we still need to keep the software emulation of RTC
for the guests up to date. The subscription to the pvclock_notifier
allows us to emulate this easily. The notifier is called at every tick
and when the clock was set.

Right now we only use that notifier when the clock was set, but due to
the fact that it is called periodically from the timekeeping update
code, we can utilize it to emulate the NTP driven drift compensation
of update_persistant_clock() for the Xen wall (software) clock.

Add a 11 minutes periodic update to the pvclock_gtod notifier callback
to achieve that. The static variable 'next' which maintains that 11
minutes update cycle is protected by the core code serialization so
there is no need to add a Xen specific serialization mechanism.

[ tglx: Massaged changelog and added a few comments ]

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: <xen-devel@lists.xen.org>
Link: http://lkml.kernel.org/r/1372329348-20841-6-git-send-email-david.vrabel@citrix.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2013-06-28 23:15:07 +02:00
..
apic.c xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static. 2012-08-21 14:50:03 -04:00
debugfs.c debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
debugfs.h debugfs: Add support to print u32 array in debugfs 2012-04-17 00:18:36 -04:00
enlighten.c Bug-fixes: 2013-05-11 16:19:30 -07:00
grant-table.c Merge commit 'v3.2-rc3' into stable/for-linus-3.3 2011-12-20 17:01:18 -05:00
irq.c xen/arm: receive Xen events on ARM 2012-09-14 13:37:32 +00:00
Kconfig x86: Make Linux guest support optional 2013-03-04 13:14:25 -08:00
Makefile xen/x86: Implement x86_apic_ops 2012-05-01 14:50:33 -04:00
mmu.c Merge branch 'x86-kaslr-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:37:24 -07:00
mmu.h xen: make a pile of mmu pvop functions static 2011-05-20 14:25:24 -07:00
multicalls.c xen/multicall: move *idx fields to start of mc_buffer 2011-07-18 15:43:46 -07:00
multicalls.h xen: use this_cpu_xxx replace percpu_xxx funcs 2012-01-24 12:20:24 -05:00
p2m.c Features: 2012-10-02 22:09:10 -07:00
pci-swiotlb-xen.c Merge branch 'stable/late-swiotlb.v3.3' into stable/for-linus-3.7 2012-09-22 20:01:24 -04:00
platform-pci-unplug.c xen/apic/xenbus/swiotlb/pcifront/grant/tmem: Make functions or variables static. 2012-08-21 14:50:03 -04:00
setup.c x86 idle: remove 32-bit-only "no-hlt" parameter, hlt_works_ok flag 2013-02-10 03:32:22 -05:00
smp.c Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 07:50:17 -07:00
smp.h xen: implement apic ipi interface 2012-05-07 15:33:15 -04:00
spinlock.c xen/spinlock: Fix check from greater than to be also be greater or equal to. 2013-05-08 08:38:09 -04:00
suspend.c Revert "xen PVonHVM: use E820_Reserved area for shared_info" 2013-02-14 21:29:31 -05:00
time.c x86: xen: Sync the CMOS RTC as well as the Xen wallclock 2013-06-28 23:15:07 +02:00
trace.c xen/trace: Fix compile error when CONFIG_XEN_PRIVILEGED_GUEST is not set 2011-08-05 09:43:02 -04:00
vdso.h
vga.c xen/vga: add the xen EFI video mode support 2012-09-24 09:28:57 -04:00
xen-asm_32.S x86/xen: don't assume %ds is usable in xen_iret for 32-bit PVOPS. 2013-02-13 15:40:30 -05:00
xen-asm_64.S xen: use iret for return from 64b kernel to 32b usermode 2009-12-03 11:14:54 -08:00
xen-asm.h xen: make direct versions of irq_enable/disable/save/restore to common code 2009-02-04 16:59:04 -08:00
xen-asm.S xen: correctly check for pending events when restoring irq flags 2012-04-27 16:04:21 -04:00
xen-head.S xen/perf: Define .glob for the different hypercalls. 2012-07-30 14:27:48 -04:00
xen-ops.h Revert "xen PVonHVM: use E820_Reserved area for shared_info" 2013-02-14 21:29:31 -05:00