From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] [RFC] Fix for kvm qemu to return control to gdb stub on breakpoints Date: Thu, 22 May 2008 13:00:16 -0500 Message-ID: <4835B4B0.3020201@codemonkey.ws> References: <5efefbab7b0f97c983a1.1211473308@thinkpadL> <4835A29C.2090407@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Jerone Young , kvm@vger.kernel.org To: Jan Kiszka Return-path: Received: from py-out-1112.google.com ([64.233.166.176]:56324 "EHLO py-out-1112.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754068AbYEVSA0 (ORCPT ); Thu, 22 May 2008 14:00:26 -0400 Received: by py-out-1112.google.com with SMTP id p76so130736pyb.10 for ; Thu, 22 May 2008 11:00:25 -0700 (PDT) In-Reply-To: <4835A29C.2090407@web.de> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: > Jerone Young wrote: > >> 1 file changed, 2 insertions(+) >> qemu/qemu-kvm.c | 2 ++ >> >> >> Currently breakpoints do not fully work for x86 or any other arch with kvm enable qemu. Control is not being returned by to the gdb stub. This patch add back this ability to return control to the gdb stub when a debug interrupt is hit. >> >> This is in the io thread so it's best to get comments on this. Is it in the best place? Should more be done here? >> >> Signed-off-by: Jerone Young >> >> diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c >> --- a/qemu/qemu-kvm.c >> +++ b/qemu/qemu-kvm.c >> @@ -352,6 +352,8 @@ static int kvm_main_loop_cpu(CPUState *e >> update_regs_for_init(env); >> if (!(env->hflags & HF_HALTED_MASK) && !info->init) >> kvm_cpu_exec(env); >> + if (env->exception_index == EXCP_DEBUG) >> + vm_stop(EXCP_DEBUG); >> > > This isn't enough, please see > > http://permalink.gmane.org/gmane.comp.emulators.kvm.devel/17660 > > and the rest of that series - just RFC, but already usable. > While I haven't looked through your whole series, the io-thread caused a regression with gdb and while I don't think that this patch is enough of a fix, it's certainly the right idea for fixing that regression. Soft breakpoints is a nice thing to do, but I think orthogonal to what this patch is addressing. Regards, Anthony Liguori > Jan > >