target/arm: Swap PMU values before/after migrations
commit980ebe87053792a5bdefaa87777c40914fd4f673
authorAaron Lindsay <aaron@os.amperecomputing.com>
Mon, 21 Jan 2019 10:23:14 +0000 (21 10:23 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 21 Jan 2019 10:38:55 +0000 (21 10:38 +0000)
tree4fe3468b705e4cb39291ef1a45a7dc10411ee684
parent5d05b9d462666ed21b7fef61aa45dec9aaa9f0ff
target/arm: Swap PMU values before/after migrations

Because of the PMU's design, many register accesses have side effects
which are inter-related, meaning that the normal method of saving CP
registers can result in inconsistent state. These side-effects are
largely handled in pmu_op_start/finish functions which can be called
before and after the state is saved/restored. By doing this and adding
raw read/write functions for the affected registers, we avoid
migration-related inconsistencies.

Signed-off-by: Aaron Lindsay <aclindsa@gmail.com>
Signed-off-by: Aaron Lindsay <aaron@os.amperecomputing.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20181211151945.29137-4-aaron@os.amperecomputing.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c
target/arm/machine.c