target-arm: KVM64: Get and Sync up guest register state like kvm32.
This patch adds: 1. Call write_kvmstate_to_list() and write_list_to_cpustate() in kvm_arch_get_registers() to sync guest register state. 2. Call write_list_to_kvmstate() in kvm_arch_put_registers() to sync guest register state. These changes are already there for kvm32 in target-arm/kvm32.c. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org> Message-id: 1423130382-18640-2-git-send-email-pranavkumar@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
8d298bee09
commit
568bab1fb8
@ -193,9 +193,12 @@ int kvm_arch_put_registers(CPUState *cs, int level)
|
||||
}
|
||||
}
|
||||
|
||||
if (!write_list_to_kvmstate(cpu)) {
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
/* TODO:
|
||||
* FP state
|
||||
* system registers
|
||||
*/
|
||||
return ret;
|
||||
}
|
||||
@ -269,6 +272,14 @@ int kvm_arch_get_registers(CPUState *cs)
|
||||
}
|
||||
}
|
||||
|
||||
if (!write_kvmstate_to_list(cpu)) {
|
||||
return EINVAL;
|
||||
}
|
||||
/* Note that it's OK to have registers which aren't in CPUState,
|
||||
* so we can ignore a failure return here.
|
||||
*/
|
||||
write_list_to_cpustate(cpu);
|
||||
|
||||
/* TODO: other registers */
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user