From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [kvm-devel] [RFC][PATCH 2/4] kvm: Arch-specifc KVM_EXIT_DEBUG payload Date: Thu, 22 May 2008 15:42:07 +0200 Message-ID: <4835782F.60804@web.de> References: <482D9198.7040801@web.de> <482DAFF6.3050403@web.de> <48344820.60103@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigAAF9FFE11E12D4B6ED9F8600" Cc: kvm-devel , Hollis Blanchard To: Avi Kivity Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:37960 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754421AbYEVNmN (ORCPT ); Thu, 22 May 2008 09:42:13 -0400 In-Reply-To: <48344820.60103@qumranet.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAAF9FFE11E12D4B6ED9F8600 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Avi Kivity wrote: > Jan Kiszka wrote: >> This adds an arch field to kvm_run.debug, the payload that is returned= >> to user space on KVM_EXIT_DEBUG guest exits. For x86, this field is no= w >> supposed to report the precise debug exception (#DB or #BP) and the >> current state of the debug registers (the latter is not yet >> implemented). >> =20 >> +struct kvm_debug_exit_arch { >> + __u32 exception; >> =20 >=20 > Need padding here. >=20 >> + __u64 dr[8]; >> +}; >> + >> =20 >=20 > In general I prefer decoding bitfields into something more usable (see > for example the segment registers), but in this case, I guess the raw > registers are better. IMHO, there is no point in parsing those arch-specific bit field in kernel space as long as the kernel has nothing to do with them (except saving and restoring them). BTW, the upcoming version will look like this: struct kvm_debug_exit_arch { __u32 exception; __u32 pad; __u64 dr6; __u64 dr7; }; (No need for reporting unused or unmodified registers here.) >=20 > We need to handle branch tracing and last branch recording as well. It= > doesn't have to be in this patchset, though. IIRC, both features are fairly vendor specific. Do we have the same level of support on both AMD and Intel CPUs? Moreover, I doubt that the debug interface would be the right place for them. Jan --------------enigAAF9FFE11E12D4B6ED9F8600 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 iD8DBQFINXgzniDOoMHTA+kRAjuOAJ9GE2zEM56bQ3e6HXfKFDNwbailzACghHq3 WWSbGfgWdqCCRv1LOkdBmmw= =K2// -----END PGP SIGNATURE----- --------------enigAAF9FFE11E12D4B6ED9F8600--