target-arm: kvm64 fix save/restore of SPSR regs
commit25b9fb107bc1f6735fdb3fce537792f5db95f78d
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 1 Apr 2015 16:57:30 +0000 (1 17:57 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 1 Apr 2015 16:57:30 +0000 (1 17:57 +0100)
treeacfd61575f6477eaa869a9e4f5369c65f43ee623
parent0e4b586932768107448f342ae4a314beedfa8f11
target-arm: kvm64 fix save/restore of SPSR regs

The current code was negatively indexing the cpu state array and not
synchronizing banked spsr register state with the current mode's spsr
state, causing occasional failures with migration.

Some munging is done to take care of the aarch64 mapping and also to
ensure the most current value of the spsr is updated to the banked
registers (relevant for KVM<->TCG migration).

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/kvm64.c