From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43832 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OWvWh-0000in-3v for qemu-devel@nongnu.org; Thu, 08 Jul 2010 14:08:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OWvHk-0001Wc-K7 for qemu-devel@nongnu.org; Thu, 08 Jul 2010 13:53:22 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:34237) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OWvHk-0001WS-Hp for qemu-devel@nongnu.org; Thu, 08 Jul 2010 13:53:20 -0400 Received: by yxm8 with SMTP id 8so224262yxm.4 for ; Thu, 08 Jul 2010 10:53:19 -0700 (PDT) Message-ID: <4C36108A.309@codemonkey.ws> Date: Thu, 08 Jul 2010 12:53:14 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Guest to Qemu communication channel + static instrumentation References: <86lj9luamd.wl%lluis@ginnungagap.pc.ac.upc.edu> In-Reply-To: <86lj9luamd.wl%lluis@ginnungagap.pc.ac.upc.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Llu=EDs?= Cc: qemu-devel@nongnu.org On 07/08/2010 12:49 PM, Lluís wrote: > Hi there. > > I'm porting into qemu some code I had for bochs. For this purpose, the first > part is a backdoor communication channel, such that code in the guest will be > able to directly communicate with qemu in a pre-defined manner (namely, the > decode of an illegal instruction). > At least for x86, there is a well defined instruction for these purposes (vmcall and vmmcall respectively). I think qemu implementing vmcall/vmmcall emulation for TCG is not a bad idea. > Right now, this comes with a '--with-backdoor=PATH' flag in the configure > script, which lets the user activate the communication channel, and make qemu > compile all '.c' files in PATH as target code. > > In those files, the user can place any code, plus backdoor callbacks (these are > a must), which are free to interact with any other piece of code in qemu. > > Are you interested on merging this kind of functionality? > > The only reason for this is to control the behaviour of the other piece of code > I'm working on (which I would very much like to integrate into qemu). > > This other piece is a set of static instrumentation points using macros that the > user can re-define at compile time. > > For an example of how it would look like: > http://bochs.sourceforge.net/cgi-bin/lxr/source/instrument/ > It's not immediately clear to me how this would map to TCG so I'm unclear about it's utility. Regards, Anthony Liguori > Read you, > Lluis > >