Received: from eggs.gnu.org ([140.186.70.92]:35247) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QyUo7-00052A-IQ for qemu-devel@nongnu.org; Tue, 30 Aug 2011 16:21:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QyUo6-0002iq-2L for qemu-devel@nongnu.org; Tue, 30 Aug 2011 16:21:15 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:58295) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QyUo5-0002iY-NZ for qemu-devel@nongnu.org; Tue, 30 Aug 2011 16:21:14 -0400 From: =?utf-8?Q?Llu=C3=ADs?= References: <1314389053-30841-1-git-send-email-lmr@redhat.com> <4E5B2A3D.3000905@redhat.com> <878vqag09j.fsf@ginnungagap.bsc.es> Date: Tue, 30 Aug 2011 22:20:49 +0200 In-Reply-To: (Blue Swirl's message of "Tue, 30 Aug 2011 19:54:37 +0000") Message-ID: <8739gid526.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] hw: Add test device for unittests execution List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: Lucas Meneghel Rodrigues , Marcelo Tosatti , Gerd Hoffmann , Avi Kivity , qemu-devel@nongnu.org Blue Swirl writes: > On Tue, Aug 30, 2011 at 7:36 PM, Llu=C3=ADs wrote: >> Blue Swirl writes: >>=20 >>> Even better, taking the instrumentation approach, could the test >>> device be left out completely, just use guest invisible methods (like >>> watchpoints) to interact with the guest? >>=20 >> I don't get it. Sorry but I've not been closely following the thread, >> and a quick look at it gave me no clues about what you mean. > The use case for the proposed test device is that guest and host can > interact during testing and debugging, preferably not for production. > But I think instrumentation needs are not unlike this case. I think I > proposed earlier to you that instead of intrusive code changes, guest > invisible methods, for example watchpoints and virtual hardware could > be used. Maybe we could be able to solve several problems at once? If > the test device would provide a generic way to connect to an external > program, wouldn't that be useful also for instrumentation? Ah, now I get it. Well, guest-host interaction is what I call the backdoor channel, which from my point of view is orthogonal to instrumentation. Of course, you could implement the former on top of the latter. But I still believe using watchpoints is too heavyweight for the kind of instrumentation that I want (watchpoints go through the slow memory access path, while I instrument the guest during TCG code generation), and does not support all the kinds of information that I want to gather (i.e., the registers that a specific guest instruction is using). On the other hand, you really convinced me that using virtual devices is the right thing to do to implement a backdoor channel, as opposed to my previous approach of adding per-target special instructions. Thus it will work in all modes (TCG and KVM) and in all targets. Lluis --=20 "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth