FROMLIST: kvm: x86: implement KVM PM-notifier

Implement PM hibernation/suspend prepare notifiers so that KVM
can reliably set PVCLOCK_GUEST_STOPPED on VCPUs and properly
suspend VMs.

Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
(am from https://lore.kernel.org/patchwork/patch/1441656/)
(also found at https://lore.kernel.org/r/20210606021045.14159-2-senozhatsky@chromium.org)

BUG=b:187377603
TEST=did rounds of suspend-resume on hatch-arc-r and checked that
     PVCLOCK_GUEST_STOPPED is set

Change-Id: I5523ff29b7930924cfc69e1789a16eb537771521
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2951945
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Suleiman Souhlal <suleiman@chromium.org>
Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Commit-Queue: Sergey Senozhatsky <senozhatsky@chromium.org>
(cherry picked from commit 362cd435f13af3234845f7dc7b0a7fa82c2173f9)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2965944
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Auto-Submit: Sergey Senozhatsky <senozhatsky@chromium.org>
2 files changed