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

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