From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [RFC] Reworking KVM_DEBUG_GUEST Date: Wed, 14 May 2008 21:10:06 +0200 Message-ID: <482B390E.7040004@web.de> References: <48282B63.6000204@web.de> <1210777972.6580.15.camel@thinkpadL> <482B0533.2060603@web.de> <200805141325.32231.hollisb@us.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0119306338==" Cc: kvm-devel@lists.sourceforge.net, kvm-ppc-devel@lists.sourceforge.net, jyoung5@us.ibm.com To: Hollis Blanchard Return-path: In-Reply-To: <200805141325.32231.hollisb@us.ibm.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --===============0119306338== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3381D44EF4E8E018F409DDA8" This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3381D44EF4E8E018F409DDA8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hollis Blanchard wrote: > On Wednesday 14 May 2008 10:28:51 Jan Kiszka wrote: >> So gdb on power relies only on those few hw-breakpoints? With x86 you >> can perfectly run gdb (with soft BPs) in parallel with the gdbstub >> (currently based on hw-BPs, but the same would be true for soft-BPs >> inserted by the gdbstub). >=20 > GDB on Power inserts trap instructions, i.e. standard "soft" breakpoint= s. It=20 > does not rely on the hardware breakpoints. >=20 > It gets a little more complicated when you involve a GDB stub. IIRC, GD= B will=20 > ask the stub to set the breakpoint, and if the stub doesn't support it,= GDB=20 > will fall back to overwriting the instructions in memory. Does the Qemu= GDB=20 > stub advertise breakpoint support? Yes, QEMU reacts on both Z0 (soft-BP) and Z1 (hard-BP). That's something even gdbserver does not do! It just handles watchpoints (Z2..4). >=20 > If not, the only support needed in KVM would be to send all debug inter= rupts=20 > to qemu, and allow qemu to send them back down for in-guest breakpoints= =2E >=20 Simply returning "unsupported" on Z0 is not yet enough for x86, KVM's kernel side should not yet inform QEMU about soft-BP exceptions. But in theory, this should be easily fixable (or is already the case for other archs). And it would safe us from keeping track of N software breakpoints, where N could even become larger than 32, the current hardcoded limit for plain QEMU. :) Meanwhile I realized that the proposed KVM_DEBUG_GUEST API is insufficient: We need a return channel for the debug register state (specifically to figure out details about hit watchpoints). I'm now favoring KVM_SET_DEBUG and KVM_GET_DEBUG as two new IOCTLs, enabling us to write _and_ read-back the suggested data structure. Jan --------------enig3381D44EF4E8E018F409DDA8 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 iD8DBQFIKzkRniDOoMHTA+kRAm+jAJsHThX2lM1guZExXC03Gb4Q9Ra4YgCeMqwy IIqxDUQ4Xh99lSCOAiXoY7A= =0LTm -----END PGP SIGNATURE----- --------------enig3381D44EF4E8E018F409DDA8-- --===============0119306338== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ --===============0119306338== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel --===============0119306338==--