[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC][PATCH 0/5] backdoor: lightweight guest-to-QEMU ba

From: Lluís Vilanova
Subject: Re: [Qemu-devel] [RFC][PATCH 0/5] backdoor: lightweight guest-to-QEMU backdoor channel
Date: Thu, 29 Sep 2011 19:10:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

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<address@hidden>

> 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

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.


 "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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]