linux-stable/drivers/xen
Juergen Gross 49c5a805a2 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: Juergen Gross <jgross@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-31 08:13:48 +01:00
..
events xen: Fix x86 sched_clock() interface for xen 2019-01-31 08:13:48 +01:00
xen-pciback
xenbus xen: xenbus_dev_frontend: Really return response string 2018-06-21 04:02:42 +09:00
xenfs
acpi.c
arm-device.c
balloon.c Revert "xen/balloon: Mark unallocated host memory as UNUSABLE" 2018-12-17 09:28:53 +01:00
biomerge.c
cpu_hotplug.c xen: avoid crash in disable_hotplug_cpu 2018-10-10 08:54:26 +02:00
dbgp.c
efi.c
evtchn.c
fallback.c
features.c
gntalloc.c
gntdev.c xen/gntdev: Fix partial gntdev_mmap() cleanup 2018-03-03 10:24:37 +01:00
grant-table.c xen/grant-table: Use put_page instead of free_page 2018-04-26 11:02:17 +02:00
Kconfig
Makefile
manage.c xen/manage: don't complain about an empty value in control/sysrq node 2018-10-10 08:54:26 +02:00
mcelog.c
pci.c
pcpu.c
platform-pci.c
preempt.c
privcmd.c
privcmd.h
pvcalls-back.c xen/pvcalls: fix null pointer dereference on map->sock 2018-05-30 07:52:05 +02:00
swiotlb-xen.c xen-swiotlb: use actually allocated size on check physical continuous 2018-11-13 11:15:02 -08:00
sys-hypervisor.c
time.c
tmem.c mm, swap, frontswap: fix THP swap if frontswap enabled 2018-02-28 10:19:41 +01:00
xen-acpi-cpuhotplug.c
xen-acpi-memhotplug.c
xen-acpi-pad.c
xen-acpi-processor.c xen/acpi: off by one in read_acpi_id() 2018-05-30 07:52:26 +02:00
xen-balloon.c xen/balloon: Support xend-based toolstack 2018-11-13 11:15:02 -08:00
xen-scsiback.c xen/scsiback: add error handling for xenbus_printf 2018-08-24 13:09:01 +02:00
xen-selfballoon.c
xen-stub.c
xlate_mmu.c xen: xlate_mmu: add missing header to fix 'W=1' warning 2018-12-17 09:28:53 +01:00