Received: from eggs.gnu.org ([140.186.70.92]:53218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYPau-0008ED-Mb for qemu-devel@nongnu.org; Wed, 07 Dec 2011 17:04:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYPat-0003dG-I4 for qemu-devel@nongnu.org; Wed, 07 Dec 2011 17:04:04 -0500 Received: from gw.ac.upc.es ([147.83.30.3]:46165 helo=gw.ac.upc.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYPat-0003cl-3Z for qemu-devel@nongnu.org; Wed, 07 Dec 2011 17:04:03 -0500 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <20111205222208.31271.65662.stgit@ginnungagap.bsc.es> <4EDE9CBE.9080707@codemonkey.ws> <87ehwgvah0.fsf@ginnungagap.bsc.es> <4EDF703E.20401@codemonkey.ws> <87obvkqucc.fsf@ginnungagap.bsc.es> <4EDF8ABB.7010208@codemonkey.ws> <87aa74gvxj.fsf@ginnungagap.bsc.es> <4EDFA6ED.20907@codemonkey.ws> <87pqg01b7w.fsf@ginnungagap.bsc.es> <4EDFB65F.902@codemonkey.ws> <87zkf4rvgn.fsf@ginnungagap.bsc.es> Date: Wed, 07 Dec 2011 23:03:50 +0100 In-Reply-To: <87zkf4rvgn.fsf@ginnungagap.bsc.es> (=?utf-8?Q?=22Llu=C3=ADs?= Vilanova"'s message of "Wed, 07 Dec 2011 21:13:44 +0100") Message-ID: <87vcpsdoop.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 v2 0/5] backdoor: lightweight guest-to-QEMU backdoor channel List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Blue Swirl , Peter Maydell , Zhi Yong Wu , qemu-devel@nongnu.org Llu=C3=ADs Vilanova writes: [...] > From my experience, these are the basics I need: > * Decide what to do when an event is translated (by default - no instrume= ntation > -, it just generates a TCG call to an execution-time tracing routine). > This includes: > * Deciding whether to generate the TCG call to the execution-time traci= ng > routine. > * Access to generating other arbitrary TCG code (the API is pretty stab= le, but > headers depend on target-specific defines). > This could also include generating code like incrementing a counter (= e.g., > when counting instructions), instead of calling the execution-time tr= acing > routine. > My library actually hides this from the user, who just provides condi= tions > to establish whether to trace the event. Then the library automatical= ly > establishes whether it's best to evaluate each condition at translati= on > time, using TCG code or when the execution-time tracing routine is in= voked. > * [still don't have it] Access to a map between target-specific abstrac= tions > (mainly register names) and TCG values (e.g., to generate code that g= ets or > sets the value of a well-known register). > * Decide what to do when an event is executed, including calls to executi= on-time > event tracing routines generated by TCG code (by default, it just calls= the > tracing backend). > This includes: > * Arbitrary user-provided code (the analysis itself when not inlined wi= th > TCG). > * [still don't have it] Access to get and set the values of target-spec= ific > abstractions (mainly registers). > * Add a per-vCPU opaque pointer with data private to the analyzer code. I forgot to add that another nice addition is to let the translation-time user-code specify which global registers might be accessed in the execution= -time user code (thus the translation can generate TCG_CALL_CONST by default). Right now, it is established at compile time by having two event properties= ; one with and one without TCG_CALL_CONST-enabled TCG helpers. 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