From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] [RFC] Fix for kvm qemu to return control to gdb stub on breakpoints Date: Thu, 22 May 2008 21:04:27 +0200 Message-ID: <4835C3BB.2050300@web.de> References: <5efefbab7b0f97c983a1.1211473308@thinkpadL> <4835A29C.2090407@web.de> <4835B4B0.3020201@codemonkey.ws> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFE03C4ECD57FE19268D6704F" Cc: Jerone Young , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:36447 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751879AbYEVTE3 (ORCPT ); Thu, 22 May 2008 15:04:29 -0400 In-Reply-To: <4835B4B0.3020201@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFE03C4ECD57FE19268D6704F Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Anthony Liguori wrote: > Jan Kiszka wrote: >> Jerone Young wrote: >> =20 >>> 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 =3D=3D EXCP_DEBUG) >>> + vm_stop(EXCP_DEBUG); >>> =20 >> >> 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. >> =20 >=20 > 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 o= f > a fix, it's certainly the right idea for fixing that regression. >=20 > Soft breakpoints is a nice thing to do, but I think orthogonal to what > this patch is addressing. For sure this or a similar approach is required, and I'm fine if we fix this beforehand. I just pointed to my series to avoid duplicate and lengthy debugging of known and (hopefully) fixed issues. I already went through this. :) Jan --------------enigFE03C4ECD57FE19268D6704F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFINcO7niDOoMHTA+kRAvTIAJ93ZdbuULt44KY2cUesW6m9+0JiSQCffttf /l6NUeEMyBHNRFHieD2QKGc= =GENu -----END PGP SIGNATURE----- --------------enigFE03C4ECD57FE19268D6704F--