target-arm: kvm: save/restore mp state

This adds the saving and restore of the current Multi-Processing state
of the machine. While the KVM_GET/SET_MP_STATE API exposes a number of
potential states for x86 we only use two for ARM. Either the process is
running or not. We then save this state into the cpu_powered TCG state
to avoid changing the serialisation format.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Alex Bennée 2015-04-01 17:57:30 +01:00 committed by Peter Maydell
parent 7847f9ea9f
commit 1a1753f747
4 changed files with 69 additions and 0 deletions

View file

@ -211,6 +211,8 @@ int kvm_arch_put_registers(CPUState *cs, int level)
return EINVAL;
}
kvm_arm_sync_mpstate_to_kvm(cpu);
/* TODO:
* FP state
*/
@ -310,6 +312,8 @@ int kvm_arch_get_registers(CPUState *cs)
*/
write_list_to_cpustate(cpu);
kvm_arm_sync_mpstate_to_qemu(cpu);
/* TODO: other registers */
return ret;
}