qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-ppc kvm: save cr register
@ 2013-05-30  9:26 Alexey Kardashevskiy
  2013-06-04 12:11 ` David Gibson
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Kardashevskiy @ 2013-05-30  9:26 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexey Kardashevskiy, qemu-ppc, Alexander Graf, David Gibson

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register
  2013-05-30  9:26 [Qemu-devel] [PATCH] target-ppc kvm: save cr register Alexey Kardashevskiy
@ 2013-06-04 12:11 ` David Gibson
  2013-06-05  2:36   ` Alexey Kardashevskiy
  0 siblings, 1 reply; 6+ messages in thread
From: David Gibson @ 2013-06-04 12:11 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 651 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register
  2013-06-04 12:11 ` David Gibson
@ 2013-06-05  2:36   ` Alexey Kardashevskiy
  2013-06-05  9:22     ` David Gibson
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Kardashevskiy @ 2013-06-05  2:36 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, qemu-devel, Alexander Graf

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register
  2013-06-05  2:36   ` Alexey Kardashevskiy
@ 2013-06-05  9:22     ` David Gibson
  2013-06-05 10:54       ` Alexey Kardashevskiy
  0 siblings, 1 reply; 6+ messages in thread
From: David Gibson @ 2013-06-05  9:22 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register
  2013-06-05  9:22     ` David Gibson
@ 2013-06-05 10:54       ` Alexey Kardashevskiy
  2013-06-05 11:12         ` David Gibson
  0 siblings, 1 reply; 6+ messages in thread
From: Alexey Kardashevskiy @ 2013-06-05 10:54 UTC (permalink / raw)
  To: David Gibson; +Cc: qemu-ppc, qemu-devel, Alexander Graf

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH] target-ppc kvm: save cr register
  2013-06-05 10:54       ` Alexey Kardashevskiy
@ 2013-06-05 11:12         ` David Gibson
  0 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2013-06-05 11:12 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: qemu-ppc, qemu-devel, Alexander Graf

[-- Attachment #1: Type: text/plain, Size: 802 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-06-05 11:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-30  9:26 [Qemu-devel] [PATCH] target-ppc kvm: save cr register Alexey Kardashevskiy
2013-06-04 12:11 ` David Gibson
2013-06-05  2:36   ` Alexey Kardashevskiy
2013-06-05  9:22     ` David Gibson
2013-06-05 10:54       ` Alexey Kardashevskiy
2013-06-05 11:12         ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).