> -----Original Message----- > From: jan.kiszka@xxxxxx [mailto:jan.kiszka@xxxxxx] > Sent: Saturday, July 25, 2009 6:19 PM > To: Liu Yu-B13201 > Cc: qemu-devel; Hollis Blanchard; kvm-ppc; Nathan Froyd > Subject: Re: [PATCH 3/5] Add guest debug support for kvmppc > > Liu Yu wrote: > > Signed-off-by: Liu Yu > <yu.liu-KZfg59tc24xl57MIdRCFDg@xxxxxxxxxxxxxxxx> > > --- > > target-ppc/kvm.c | 197 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 files changed, 197 insertions(+), 0 deletions(-) > > > > diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c > > index b53d6e9..d8dbdb4 100644 > > --- a/target-ppc/kvm.c > > +++ b/target-ppc/kvm.c > > + > > +int kvm_arch_debug(struct kvm_debug_exit_arch *arch_info) > > +{ > > + int handle = 0; > > + int n; > > + > > + if (cpu_single_env->singlestep_enabled) { > > + handle = 1; > > + > > + } else if (arch_info->status) { > > + if (arch_info->status == KVMPPC_DEBUG_BREAKPOINT) { > > + n = find_hw_breakpoint(arch_info->pc, > GDB_BREAKPOINT_HW); > > + if (n >= 0) > > + handle = 1; > > + > > + } else if (arch_info->status == > KVMPPC_DEBUG_WATCH_ACCESS) { > > + n = find_hw_breakpoint(arch_info->pc, > GDB_WATCHPOINT_ACCESS); > > + if (n >= 0) { > > + handle = 1; > > + cpu_single_env->watchpoint_hit = &hw_watchpoint; > > + hw_watchpoint.vaddr = hw_breakpoint[n].addr; > > + hw_watchpoint.flags = BP_MEM_ACCESS; > > + } > > + > > + } else if (arch_info->status == KVMPPC_DEBUG_WATCH_WRITE) { > > + n = find_hw_breakpoint(arch_info->pc, > GDB_WATCHPOINT_WRITE); > > + if (n >= 0) { > > + handle = 1; > > + cpu_single_env->watchpoint_hit = &hw_watchpoint; > > + hw_watchpoint.vaddr = hw_breakpoint[n].addr; > > + hw_watchpoint.flags = BP_MEM_WRITE; > > + } > > + } > > + > > + } else if (kvm_find_sw_breakpoint(cpu_single_env, > arch_info->pc)) > > + handle = 1; > > + > > + /* XXX inject guest debug exception */ > > + if (!handle) > > + printf("Unhandled debug exception!\n"); > > Out of curiosity: Not yet implemented here, or is PPC also > lacking some > kernel bits to support it? Yes, guest has no hardware debug support in booke kvm so far. It's now useless for a guest to set debug register. -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html