public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Initialize kvm qemu enviroment breakpoints for PowerPC
@ 2008-06-09 14:23 Jerone Young
  2008-06-09 14:54 ` Hollis Blanchard
  2008-06-18 13:39 ` Avi Kivity
  0 siblings, 2 replies; 5+ messages in thread
From: Jerone Young @ 2008-06-09 14:23 UTC (permalink / raw)
  To: kvm; +Cc: kvm-ppc

2 files changed, 3 insertions(+)
qemu/gdbstub.c          |    2 ++
qemu/qemu-kvm-powerpc.c |    1 +


This patch initilizes breakpoints in the cpu enviroment for PowerPC for kvm qemu.
It also adds places into gdb stub for commands that change env->nip, and load kvm registers with the new program counter.

Signed-off-by: Jerone Young <jyoung5@us.ibm.com>

diff --git a/qemu/gdbstub.c b/qemu/gdbstub.c
--- a/qemu/gdbstub.c
+++ b/qemu/gdbstub.c
@@ -983,6 +983,7 @@ static int gdb_handle_packet(GDBState *s
             kvm_load_registers(env);
 #elif defined (TARGET_PPC)
             env->nip = addr;
+            kvm_load_registers(env);
 #elif defined (TARGET_SPARC)
             env->pc = addr;
             env->npc = addr + 4;
@@ -1021,6 +1022,7 @@ static int gdb_handle_packet(GDBState *s
             kvm_load_registers(env);
 #elif defined (TARGET_PPC)
             env->nip = addr;
+            kvm_load_registers(env);
 #elif defined (TARGET_SPARC)
             env->pc = addr;
             env->npc = addr + 4;
diff --git a/qemu/qemu-kvm-powerpc.c b/qemu/qemu-kvm-powerpc.c
--- a/qemu/qemu-kvm-powerpc.c
+++ b/qemu/qemu-kvm-powerpc.c
@@ -31,6 +31,7 @@ extern kvm_context_t kvm_context;
 
 void cpu_reset(CPUState *env)
 {
+	memset(env->breakpoints, 0, sizeof(env->breakpoints));
 	cpu_ppc_reset(env);
 }
 

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

* Re: [PATCH] Initialize kvm qemu enviroment breakpoints for PowerPC
  2008-06-09 14:23 [PATCH] Initialize kvm qemu enviroment breakpoints for PowerPC Jerone Young
@ 2008-06-09 14:54 ` Hollis Blanchard
  2008-06-09 15:06   ` Jerone Young
  2008-06-18 13:39 ` Avi Kivity
  1 sibling, 1 reply; 5+ messages in thread
From: Hollis Blanchard @ 2008-06-09 14:54 UTC (permalink / raw)
  To: Jerone Young; +Cc: kvm, kvm-ppc

On Mon, 2008-06-09 at 09:23 -0500, Jerone Young wrote:
> diff --git a/qemu/gdbstub.c b/qemu/gdbstub.c
> --- a/qemu/gdbstub.c
> +++ b/qemu/gdbstub.c
> @@ -983,6 +983,7 @@ static int gdb_handle_packet(GDBState *s
>              kvm_load_registers(env);
>  #elif defined (TARGET_PPC)
>              env->nip = addr;
> +            kvm_load_registers(env);
>  #elif defined (TARGET_SPARC)
>              env->pc = addr;
>              env->npc = addr + 4;
> @@ -1021,6 +1022,7 @@ static int gdb_handle_packet(GDBState *s
>              kvm_load_registers(env);
>  #elif defined (TARGET_PPC)
>              env->nip = addr;
> +            kvm_load_registers(env);
>  #elif defined (TARGET_SPARC)
>              env->pc = addr;
>              env->npc = addr + 4;

These should be protected by a kvm_enabled() test, just like you see for
x86 four lines earlier.

-- 
Hollis Blanchard
IBM Linux Technology Center


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

* Re: [PATCH] Initialize kvm qemu enviroment breakpoints for PowerPC
  2008-06-09 14:54 ` Hollis Blanchard
@ 2008-06-09 15:06   ` Jerone Young
  2008-06-18 13:39     ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Jerone Young @ 2008-06-09 15:06 UTC (permalink / raw)
  To: Hollis Blanchard; +Cc: kvm, kvm-ppc

On Mon, 2008-06-09 at 09:54 -0500, Hollis Blanchard wrote:
> On Mon, 2008-06-09 at 09:23 -0500, Jerone Young wrote:
> > diff --git a/qemu/gdbstub.c b/qemu/gdbstub.c
> > --- a/qemu/gdbstub.c
> > +++ b/qemu/gdbstub.c
> > @@ -983,6 +983,7 @@ static int gdb_handle_packet(GDBState *s
> >              kvm_load_registers(env);
> >  #elif defined (TARGET_PPC)
> >              env->nip = addr;
> > +            kvm_load_registers(env);
> >  #elif defined (TARGET_SPARC)
> >              env->pc = addr;
> >              env->npc = addr + 4;
> > @@ -1021,6 +1022,7 @@ static int gdb_handle_packet(GDBState *s
> >              kvm_load_registers(env);
> >  #elif defined (TARGET_PPC)
> >              env->nip = addr;
> > +            kvm_load_registers(env);
> >  #elif defined (TARGET_SPARC)
> >              env->pc = addr;
> >              env->npc = addr + 4;
> 
> These should be protected by a kvm_enabled() test, just like you see for
> x86 four lines earlier.A

Actually the line above is x86 and it is not using kvm_enabled() before
calling kvm_load_registers().

> 


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

* Re: [PATCH] Initialize kvm qemu enviroment breakpoints for PowerPC
  2008-06-09 15:06   ` Jerone Young
@ 2008-06-18 13:39     ` Avi Kivity
  0 siblings, 0 replies; 5+ messages in thread
From: Avi Kivity @ 2008-06-18 13:39 UTC (permalink / raw)
  To: jyoung5; +Cc: Hollis Blanchard, kvm, kvm-ppc

Jerone Young wrote:
> On Mon, 2008-06-09 at 09:54 -0500, Hollis Blanchard wrote:
>   
>> On Mon, 2008-06-09 at 09:23 -0500, Jerone Young wrote:
>>     
>>> diff --git a/qemu/gdbstub.c b/qemu/gdbstub.c
>>> --- a/qemu/gdbstub.c
>>> +++ b/qemu/gdbstub.c
>>> @@ -983,6 +983,7 @@ static int gdb_handle_packet(GDBState *s
>>>              kvm_load_registers(env);
>>>  #elif defined (TARGET_PPC)
>>>              env->nip = addr;
>>> +            kvm_load_registers(env);
>>>  #elif defined (TARGET_SPARC)
>>>              env->pc = addr;
>>>              env->npc = addr + 4;
>>> @@ -1021,6 +1022,7 @@ static int gdb_handle_packet(GDBState *s
>>>              kvm_load_registers(env);
>>>  #elif defined (TARGET_PPC)
>>>              env->nip = addr;
>>> +            kvm_load_registers(env);
>>>  #elif defined (TARGET_SPARC)
>>>              env->pc = addr;
>>>              env->npc = addr + 4;
>>>       
>> These should be protected by a kvm_enabled() test, just like you see for
>> x86 four lines earlier.A
>>     
>
> Actually the line above is x86 and it is not using kvm_enabled() before
> calling kvm_load_registers().
>
>   

Yes, kvm_load_registers() has a built-in kvm_enabled() test.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


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

* Re: [PATCH] Initialize kvm qemu enviroment breakpoints for PowerPC
  2008-06-09 14:23 [PATCH] Initialize kvm qemu enviroment breakpoints for PowerPC Jerone Young
  2008-06-09 14:54 ` Hollis Blanchard
@ 2008-06-18 13:39 ` Avi Kivity
  1 sibling, 0 replies; 5+ messages in thread
From: Avi Kivity @ 2008-06-18 13:39 UTC (permalink / raw)
  To: Jerone Young; +Cc: kvm, kvm-ppc

Jerone Young wrote:
> This patch initilizes breakpoints in the cpu enviroment for PowerPC for kvm qemu.
> It also adds places into gdb stub for commands that change env->nip, and load kvm registers with the new program counter.
>   

Applied, thanks.

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


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

end of thread, other threads:[~2008-06-18 13:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-09 14:23 [PATCH] Initialize kvm qemu enviroment breakpoints for PowerPC Jerone Young
2008-06-09 14:54 ` Hollis Blanchard
2008-06-09 15:06   ` Jerone Young
2008-06-18 13:39     ` Avi Kivity
2008-06-18 13:39 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox