mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
target-ppc kvm: save cr register
This adds a missing code to save CR (condition register) via kvm_arch_put_registers(). kvm_arch_get_registers() already has it. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
ec4936e1a4
commit
4bddaf552c
1 changed files with 5 additions and 0 deletions
|
@ -791,6 +791,11 @@ int kvm_arch_put_registers(CPUState *cs, int level)
|
|||
for (i = 0;i < 32; i++)
|
||||
regs.gpr[i] = env->gpr[i];
|
||||
|
||||
regs.cr = 0;
|
||||
for (i = 0; i < 8; i++) {
|
||||
regs.cr |= (env->crf[i] & 15) << (4 * (7 - i));
|
||||
}
|
||||
|
||||
ret = kvm_vcpu_ioctl(cs, KVM_SET_REGS, ®s);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue