migration: Do not re-read the clock on pre_save in case of paused guest
commitd14f33976282a8744ca1bf1d64e73996c145aa3f
authorMaxiwell S. Garcia <maxiwell@linux.ibm.com>
Thu, 11 Jul 2019 19:47:02 +0000 (11 16:47 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 21 Aug 2019 07:17:11 +0000 (21 17:17 +1000)
treef7ebdeab615939ac1aa5b0ab5ba4583876236ec3
parentd15d4ad64f12cf88df8eac0cc910fa0637ab15e0
migration: Do not re-read the clock on pre_save in case of paused guest

Re-read the timebase before migrate was ported from x86 commit:
   6053a86fe7bd: kvmclock: reduce kvmclock difference on migration

The clock move makes the guest knows about the paused time between
the stop and migrate commands. This is an issue in an already-paused
VM because some side effects, like process stalls, could happen
after migration.

So, this patch checks the runstate of guest in the pre_save handler and
do not re-reads the timebase in case of paused state (cold migration).

Signed-off-by: Maxiwell S. Garcia <maxiwell@linux.ibm.com>
Message-Id: <20190711194702.26598-1-maxiwell@linux.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/ppc.c
target/ppc/cpu-qom.h