x86/shim: suspend and resume platform time correctly
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Thu, 5 Mar 2020 10:36:29 +0000 (11:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 5 Mar 2020 10:36:29 +0000 (11:36 +0100)
commita12c52d18cf67392ea5ec12b590ce5e5061bee54
tree3afea13a2e7307b29837c0176a894af6cd50fe05
parent21fc2667760c75a1090a390873e368798a2e4a8b
x86/shim: suspend and resume platform time correctly

Similarly to S3, platform time needs to be saved on guest suspend
and restored on resume respectively. This should account for expected
jumps in PV clock counter value after resume. time_suspend/resume()
are safe to use in PVH setting as is since any existing operations
with PIT/HPET that they do would simply be ignored if PIT/HPET is
not present.

Additionally, add resume callback for Xen PV clocksource to avoid
its breakage on migration.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
master commit: a7a3ecd82e289a9a2ecc1d3b5128580e0b577cc7
master date: 2020-02-14 18:01:52 +0000
xen/arch/x86/pv/shim.c
xen/arch/x86/time.c