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 18:43:08 +0200 Message-ID: <4835A29C.2090407@web.de> References: <5efefbab7b0f97c983a1.1211473308@thinkpadL> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigFE60A7F644E0A4C000F7738E" Cc: kvm@vger.kernel.org To: Jerone Young Return-path: Received: from fmmailgate02.web.de ([217.72.192.227]:50018 "EHLO fmmailgate02.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754675AbYEVQnP (ORCPT ); Thu, 22 May 2008 12:43:15 -0400 In-Reply-To: <5efefbab7b0f97c983a1.1211473308@thinkpadL> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigFE60A7F644E0A4C000F7738E Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Jerone Young wrote: > 1 file changed, 2 insertions(+) > qemu/qemu-kvm.c | 2 ++ >=20 >=20 > 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 p= atch add back this ability to return control to the gdb stub when a debug= interrupt is hit. >=20 > 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? >=20 > Signed-off-by: Jerone Young >=20 > 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); 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. Jan --------------enigFE60A7F644E0A4C000F7738E 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 iD8DBQFINaKgniDOoMHTA+kRAtp+AJ9IdHYUQyEhLNZxSH8dZbwZ6qPQtQCfQWLO cjsqjO04aN7m3JpibSgYhSI= =y+XR -----END PGP SIGNATURE----- --------------enigFE60A7F644E0A4C000F7738E--