All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Lluís Vilanova" <vilanova@ac.upc.edu>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Zhi Yong Wu <zwu.kernel@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC][PATCH 0/5] backdoor: lightweight guest-to-QEMU backdoor channel
Date: Thu, 29 Sep 2011 19:10:18 +0200	[thread overview]
Message-ID: <87bou39sw5.fsf@ginnungagap.bsc.es> (raw)
In-Reply-To: <4E847834.7070805@codemonkey.ws> (Anthony Liguori's message of "Thu, 29 Sep 2011 08:52:52 -0500")

Anthony Liguori writes:

> On 09/29/2011 08:47 AM, Lluís Vilanova wrote:
>> Provides the ability for the guest to communicate with user-provided code inside
>> QEMU itself, using a lightweight mechanism.
>> 
>> See first commit for a full description.
>> 
>> Signed-off-by: Lluís Vilanova<vilanova@ac.upc.edu>

> We already have two "backdoors" in QEMU: ivshmem and virtio-serial.  Can you
> discuss why these are insufficient for your purposes?

The main point is that I want the user to be able to provide (at compile time,
although it could also be done through dlopen or similar) her own implementation
of what to do immediately after the backdoor channel is invoked *and* to be able
to use QEMU internal routines from that code. I also want the mechanism to be as
lightweight as possible (i.e., no OS involvement through syscalls to use the
device); right now, channel invocation is reduced to just a single write to
memory.

Is this possible to achieve with virtio-serial or ivshmem? Maybe I just missed
the details in them that would allow me to do that without yet another device.


> Also, what's the advantage of having a backdoor mechanism both for softmmu and
> user?  I can't think of a practical use-case for it.

The intent is to have the same guest interface to interact with the
user-implemented backdoor code, regardless of which QEMU "mode" we're running on
(user or softmmu).

In the use-mode case, now I can link the application against the backdoor
interface library and add some calls to the backdoor in the points I'm
interested in. Then moving the app into softmmu would just work without further
changes (provided the guest uses the softmmu-capable version of the library).

The contents of the user implementation can be arbitrary, although my target is
to use it coupled together with the patchset for tracing guest code at the TCG
level (which I haven't sent yet in its new form). Thus you could add just a pair
of lines in the guest code to enable tracing of the executed guest instructions
only for whichever part of the program you're interested in.


Lluis

-- 
 "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

  reply	other threads:[~2011-09-29 17:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 13:47 [Qemu-devel] [RFC][PATCH 0/5] backdoor: lightweight guest-to-QEMU backdoor channel Lluís Vilanova
2011-09-29 13:47 ` [Qemu-devel] [PATCH 1/5] backdoor: Add documentation Lluís Vilanova
2011-09-29 13:47 ` [Qemu-devel] [PATCH 2/5] backdoor: Add build infrastructure Lluís Vilanova
2011-09-29 13:47 ` [Qemu-devel] [PATCH 3/5] backdoor: [*-user] Add QEMU-side proxy to "libbackdoor.a" Lluís Vilanova
2011-09-29 13:47 ` [Qemu-devel] [PATCH 4/5] backdoor: [softmmu] " Lluís Vilanova
2011-09-29 20:42   ` Blue Swirl
2011-09-29 21:49     ` Lluís Vilanova
2011-09-29 22:13       ` Frans de Boer
2011-09-29 22:35       ` Frans de Boer
2011-09-30 20:29         ` Blue Swirl
2011-09-30 20:07       ` Blue Swirl
2011-09-30 20:49         ` Lluís Vilanova
2011-09-30 20:59           ` Blue Swirl
2011-09-29 13:47 ` [Qemu-devel] [PATCH 5/5] backdoor: Add guest-side library Lluís Vilanova
2011-09-29 13:52 ` [Qemu-devel] [RFC][PATCH 0/5] backdoor: lightweight guest-to-QEMU backdoor channel Anthony Liguori
2011-09-29 17:10   ` Lluís Vilanova [this message]
2011-09-29 20:55   ` Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bou39sw5.fsf@ginnungagap.bsc.es \
    --to=vilanova@ac.upc.edu \
    --cc=anthony@codemonkey.ws \
    --cc=qemu-devel@nongnu.org \
    --cc=zwu.kernel@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.