Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register

2013-06-05 Thread David Gibson
On Wed, Jun 05, 2013 at 12:36:04PM +1000, Alexey Kardashevskiy wrote:
 On 06/04/2013 10:11 PM, David Gibson wrote:
  On Thu, May 30, 2013 at 07:26:10PM +1000, Alexey Kardashevskiy wrote:
  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 a...@ozlabs.ru
  
  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 :/.

  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.

-- 
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


pgpBtZnVifmI7.pgp
Description: PGP signature


Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register

2013-06-05 Thread Alexey Kardashevskiy
On 05.06.2013 19:22, David Gibson wrote:

 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?

 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.



-- 
With best regards

Alexey Kardashevskiy -- icq: 52150396



Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register

2013-06-05 Thread David Gibson
On Wed, Jun 05, 2013 at 08:54:38PM +1000, Alexey Kardashevskiy wrote:
 On 05.06.2013 19:22, David Gibson wrote:
 
  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?

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.

-- 
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


pgpb0rvx41TZT.pgp
Description: PGP signature


Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register

2013-06-04 Thread David Gibson
On Thu, May 30, 2013 at 07:26:10PM +1000, Alexey Kardashevskiy wrote:
 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 a...@ozlabs.ru

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 :(.

-- 
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


pgpYrIz8Hb5kL.pgp
Description: PGP signature


Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register

2013-06-04 Thread Alexey Kardashevskiy
On 06/04/2013 10:11 PM, David Gibson wrote:
 On Thu, May 30, 2013 at 07:26:10PM +1000, Alexey Kardashevskiy wrote:
 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 a...@ozlabs.ru
 
 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


 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?


-- 
Alexey



[Qemu-devel] [PATCH] target-ppc kvm: save cr register

2013-05-30 Thread Alexey Kardashevskiy
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 a...@ozlabs.ru
---
 target-ppc/kvm.c |5 +
 1 file changed, 5 insertions(+)

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, regs);
 if (ret  0)
 return ret;
-- 
1.7.10.4