Received: from [140.186.70.92] (port=59906 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PDjK7-0000gj-Rk for qemu-devel@nongnu.org; Wed, 03 Nov 2010 15:48:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PDjK6-00040e-EH for qemu-devel@nongnu.org; Wed, 03 Nov 2010 15:48:43 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:36845 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PDjK6-00040O-2F for qemu-devel@nongnu.org; Wed, 03 Nov 2010 15:48:42 -0400 From: =?utf-8?b?TGx1w61z?= Date: Wed, 03 Nov 2010 20:48:49 +0100 Message-ID: <20101103194849.5871.90387.stgit@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [RFC][PATCH v1 0/6] backdoor: instruction-based guest-to-QEMU backdoor communication channel List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Provides the ability for the guest to communicate with user-provided code inside QEMU itself. This backdoor communication channel is based on using instructions, as opposed to methods based on MMIO/PIO or virtproxy/virtagent. Then, these instructions are redirected to a set of user-provided routines, which are expected to be in the static library "libbackdoor.a", identified by the "--with-backdoor" configuration parameter. The advantages of this method are: * Minimal setup for the guest. Can be used with a simple library using LD_PRELOAD, or simply adding calls to the macros in "backdoor/guest.h". * Low-overhead. Using instructions does not go through any OS abstraction, not even for the setup of the communication channel. * Non-intrusive wrt OS. It can be used on any OS without prior modifications. When possible, this will overload unused/meaningless instructions in order to let the modified guest application to run natively without errors (e.g., using the CPUID instruction in x86 systems). Signed-off-by: Lluís Vilanova --- Lluís Vilanova (6): [arm m68k] move helpers.h to helper.h backdoor: handle config-time activation backdoor: declare host-side backdoor helpers backdoor: declare guest-side interface macros backdoor: [i386] provide and implement intruction-based backdoor interface backdoor: add a simple example .gitignore | 1 Makefile.target | 40 +++ backdoor/examples/print/README | 13 + backdoor/examples/print/guest/Makefile | 7 backdoor/examples/print/guest/test.c | 33 ++ backdoor/examples/print/host/Makefile | 13 + backdoor/examples/print/host/printcb.c | 36 +++ backdoor/guest.h | 54 ++++ backdoor/helper.h | 21 + configure | 21 + target-arm/helper.c | 2 target-arm/helper.h | 450 ++++++++++++++++++++++++++++++++ target-arm/helpers.h | 450 -------------------------------- target-arm/iwmmxt_helper.c | 2 target-arm/neon_helper.c | 2 target-arm/op_helper.c | 2 target-arm/translate.c | 6 target-i386/cpuid.c | 27 ++ target-i386/helper.h | 4 target-i386/translate.c | 4 target-m68k/helper.c | 2 target-m68k/helper.h | 54 ++++ target-m68k/helpers.h | 54 ---- target-m68k/op_helper.c | 2 target-m68k/translate.c | 6 25 files changed, 786 insertions(+), 520 deletions(-) create mode 100644 backdoor/examples/print/README create mode 100644 backdoor/examples/print/guest/Makefile create mode 100644 backdoor/examples/print/guest/test.c create mode 100644 backdoor/examples/print/host/Makefile create mode 100644 backdoor/examples/print/host/printcb.c create mode 100644 backdoor/guest.h create mode 100644 backdoor/helper.h create mode 100644 target-arm/helper.h delete mode 100644 target-arm/helpers.h create mode 100644 target-m68k/helper.h delete mode 100644 target-m68k/helpers.h