linux-stable/drivers/xen
Juergen Gross 4432362af3 xen: Fix x86 sched_clock() interface for xen
commit 867cefb4cb upstream.

Commit f94c8d1169 ("sched/clock, x86/tsc: Rework the x86 'unstable'
sched_clock() interface") broke Xen guest time handling across
migration:

[  187.249951] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  187.251137] OOM killer disabled.
[  187.251137] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  187.252299] suspending xenstore...
[  187.266987] xen:grant_table: Grant tables using version 1 layout
[18446743811.706476] OOM killer enabled.
[18446743811.706478] Restarting tasks ... done.
[18446743811.720505] Setting capacity to 16777216

Fix that by setting xen_sched_clock_offset at resume time to ensure a
monotonic clock value.

[boris: replaced pr_info() with pr_info_once() in xen_callback_vector()
 to avoid printing with incorrect timestamp during resume (as we
 haven't re-adjusted the clock yet)]

Fixes: f94c8d1169 ("sched/clock, x86/tsc: Rework the x86 'unstable' sched_clock() interface")
Cc: <stable@vger.kernel.org> # 4.11
Reported-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
Tested-by: Hans van Kranenburg <hans.van.kranenburg@mendix.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-22 21:40:32 +01:00
..
events xen: Fix x86 sched_clock() interface for xen 2019-01-22 21:40:32 +01:00
xen-pciback treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
xenbus xen: export device state to sysfs 2018-08-28 17:37:40 -04:00
xenfs License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
acpi.c
arm-device.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
balloon.c Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" 2018-12-17 09:24:39 +01:00
biomerge.c xen/biomerge: Use true and false for boolean values 2018-08-06 10:20:57 -04:00
cpu_hotplug.c xen: avoid crash in disable_hotplug_cpu 2018-09-14 08:51:10 -04:00
dbgp.c
efi.c
evtchn.c treewide: kvmalloc() -> kvmalloc_array() 2018-06-12 16:19:22 -07:00
fallback.c
features.c
gntalloc.c
gntdev-common.h xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00
gntdev-dmabuf.c drm pull for 4.19-rc1 2018-08-15 17:39:07 -07:00
gntdev-dmabuf.h xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00
gntdev.c xen/gntdev: fix up blockable calls to mn_invl_range_start 2018-09-14 08:52:30 -04:00
grant-table.c xen/grant-table: Fix incorrect gnttab_dma_free_pages() pr_debug message 2018-11-27 16:13:04 +01:00
Kconfig xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
Makefile xen/gntdev: Add initial support for dma-buf UAPI 2018-07-26 23:05:14 -04:00
manage.c xen/manage: don't complain about an empty value in control/sysrq node 2018-09-14 08:51:10 -04:00
mcelog.c xen/mcelog: eliminate redundant setting of interface version 2018-08-20 14:46:18 -04:00
mem-reservation.c xen/balloon: add runtime control for scrubbing ballooned out pages 2018-09-14 08:51:10 -04:00
pci.c
pcpu.c
platform-pci.c
preempt.c
privcmd-buf.c xen: remove size limit of privcmd-buf mapping interface 2018-11-13 11:08:52 -08:00
privcmd.c xen: add new hypercall buffer mapping device 2018-06-22 08:26:42 +02:00
privcmd.h xen: add new hypercall buffer mapping device 2018-06-22 08:26:42 +02:00
pvcalls-back.c xen/pvcalls: fix null pointer dereference on map->sock 2018-02-26 17:13:12 +01:00
pvcalls-front.c pvcalls-front: fixes incorrect error handling 2018-12-17 09:24:39 +01:00
pvcalls-front.h xen: fix poll misannotation 2018-02-01 10:07:32 -05:00
swiotlb-xen.c xen-swiotlb: use actually allocated size on check physical continuous 2018-11-13 11:08:40 -08:00
sys-hypervisor.c
time.c xen: features and fixes for v4.15-rc1 2017-11-16 13:06:27 -08:00
tmem.c mm, swap, frontswap: fix THP swap if frontswap enabled 2018-02-21 15:35:43 -08:00
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c xen/ACPI: don't upload Px/Cx data for disabled processors 2018-08-20 14:46:18 -04:00
xen-balloon.c xen/balloon: Support xend-based toolstack 2018-11-13 11:08:40 -08:00
xen-scsiback.c SCSI misc on 20180815 2018-08-15 22:06:26 -07:00
xen-selfballoon.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
xen-stub.c
xlate_mmu.c xen: xlate_mmu: add missing header to fix 'W=1' warning 2018-12-17 09:24:39 +01:00