diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2013-06-15 11:51:51 +1000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2013-07-01 01:11:16 +0200 |
commit | 4bddaf552c3a05e1fdd2c82d6b28ebc8f99269c9 (patch) | |
tree | 000289a5504b00c25cb6f0c078102f8ba580c5c5 | |
parent | ec4936e1a49ef2d7129a1813ed7a3ca826698bfb (diff) | |
download | qemu-4bddaf552c3a05e1fdd2c82d6b28ebc8f99269c9.zip qemu-4bddaf552c3a05e1fdd2c82d6b28ebc8f99269c9.tar.gz qemu-4bddaf552c3a05e1fdd2c82d6b28ebc8f99269c9.tar.bz2 |
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>
-rw-r--r-- | target-ppc/kvm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 2bbc3b8..c89dd58 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -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; |