Skip to contentSkip to conversation

target-ppc kvm: save cr register

PATCH Superseded Alexey Kardashevskiy 2 participants 6 messages May 30, 2013 – Jun 5, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 target-ppc/kvm.c |    5 +++++
 1 file changed, 5 insertions(+)
target-ppc/kvm.c +5 -0
index 2bbc3b8..c89dd58 100644
@@ -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, &regs);
     if (ret < 0)
         return ret;
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 4 lines · Alexey Kardashevskiy

This adds a missing code to save CR (condition register) via kvm_arch_put_registers(). kvm_arch_get_registers() already has it.

Huh. I can't believe that's been broken for so long. I'll put that in my tree.

I meant to post my pending patches at the end of last week, but was sidetracked by a minor injury :(.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#2 lore raw
Quoted 8 lines · David Gibson
Quoted 4 lines · Alexey Kardashevskiy

This adds a missing code to save CR (condition register) via kvm_arch_put_registers(). kvm_arch_get_registers() already has it.

Huh. I can't believe that's been broken for so long. I'll put that in my tree.

We probably have another bug which compensates this one but just have not found it yet :-D

Quoted 2 lines

I meant to post my pending patches at the end of last week, but was sidetracked by a minor injury :(.

Sigh...
What exactly are you going to post? PCI rework?

Signature · 1 line
Alexey
#3 lore raw
Quoted 5 lines · Alexey Kardashevskiy
Quoted 4 lines · David Gibson
Quoted 3 lines · Alexey Kardashevskiy

This adds a missing code to save CR (condition register) via kvm_arch_put_registers(). kvm_arch_get_registers() already has it.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Huh. I can't believe that's been broken for so long. I'll put that in my tree.

We probably have another bug which compensates this one but just have not found it yet :-D

Yay :/.

Quoted 5 lines
Quoted 2 lines

I meant to post my pending patches at the end of last week, but was sidetracked by a minor injury :(.

Sigh...
What exactly are you going to post? PCI rework?

Well until now the only thing I had in my ppc-next tree was the change of default machine. I have the PCI stuff too, but that's no PCI related so I was going to post those separately, rather than as a PPC pull request.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
#4 lore raw
Quoted 8 lines · David Gibson
Quoted 5 lines
Quoted 2 lines

I meant to post my pending patches at the end of last week, but was sidetracked by a minor injury :(.

Sigh...
What exactly are you going to post? PCI rework?

Well until now the only thing I had in my ppc-next tree was the change of default machine.

btw what is going on with this patch?

Quoted 3 lines

I have the PCI stuff too, but that's no PCI
related so I was going to post those separately, rather than as a PPC pull request.

I guess I still want this stuff for VFIO, some bits.

Signature · 3 lines
With best regards

Alexey Kardashevskiy -- icq: 52150396
#5 lore raw
Quoted 5 lines · Alexey Kardashevskiy
Quoted 3 lines · David Gibson
Quoted 3 lines
Quoted 2 lines

I meant to post my pending patches at the end of last week, but was sidetracked by a minor injury :(.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

Sigh...
What exactly are you going to post? PCI rework?

Well until now the only thing I had in my ppc-next tree was the change of default machine.

btw what is going on with this patch?

I've pulled it into my github tree at
git://github.com/dgibson/qemu.git, ppc-next branch. I'm still trying to find time to push that out.

Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson