From: Anthony Liguori <anthony@codemonkey.ws>
To: Chris Wright <chrisw@redhat.com>
Cc: libvir-list@redhat.com, Jiri Denemark <jdenemar@redhat.com>,
Chris Lalancette <clalance@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] KVM call minutes for Mar 15
Date: Tue, 15 Mar 2011 16:05:32 -0500 [thread overview]
Message-ID: <4D7FD49C.7070108@codemonkey.ws> (raw)
In-Reply-To: <20110315190606.GM20456@x200.localdomain>
On 03/15/2011 02:06 PM, Chris Wright wrote:
> * Anthony Liguori (anthony@codemonkey.ws) wrote:
>> On 03/15/2011 09:53 AM, Chris Wright wrote:
>>> QAPI
> <snip>
>>> - c library implementation is critical to have unit tests and test
>>> driven development
>>> - thread safe?
>>> - no shared state, no statics.
>>> - threading model requires lock for the qmp session
>>> - licensiing?
>>> - LGPL
>>> - forwards/backwards compat?
>>> - designed with that in mind see wiki:
>>>
>>> http://wiki.qemu.org/Features/QAPI
>> One neat feature of libqmp is that once libvirt has a better QMP
>> passthrough interface, we can create a QmpSession that uses libvirt.
>>
>> It would look something like:
>>
>> QmpSession *libqmp_session_new_libvirt(virDomainPtr dom);
> Looks like you mean this?
>
> -> request QmpSession ->
> client libvirt
> <- return QmpSession<-
>
> client -> QmpSession -> QMP -> QEMU
Maybe, your ASCII art confuses me :-)
QmpSession is just a wrapper around a transport. It can be an fd that
you read() and write() JSON strings to, but it's just as easy to read
and write through JSON strings via virQemuMonitorCommand() or whatever
the interface currently is.
> So bypassing libvirt completely to actually use the session?
>
> Currently, it's more like:
>
> client -> QemuMonitorCommand -> libvirt -> QMP -> QEMU
It's not bypassing. It's an API on top of a libvirt command.
FWIW, the code generator could be trivially modified to generate a
libvirt style API if there's any interest. So instead of:
void qmp_block_passwd(QmpSession *sess, const char *device, const char
*password, Error **errp);
It would be:
int virQemuBlockPasswd(virDomainPtr dom, const char *device, const char
*password);
But I'm not sure that's really that useful.
>> The QmpSession returned by this call can then be used with all of
>> the libqmp interfaces. This means we can still exercise our test
>> suite with a guest launched through libvirt. It also should make
>> the libvirt pass through interface a bit easier to consume by third
>> parties.
> This sounds like it's something libvirt folks should be involved with.
> At the very least, this mode is there now and considered basically
> unstable/experimental/developer use:
>
> "Qemu monitor command '%s' executed; libvirt results may be unpredictable!"
>
> So likely some concern about making it easier to use, esp. assuming
> that third parties above are mgmt apps, not just developers.
To be clear, there's no real support needed from libvirt here other than
the passthrough.
How that interface is supported in libvirt is more or less orthogonal to
libqmp. libqmp is a C API to QMP. It can speak QMP over whatever
transports speak QMP. If you can speak QMP to libvirt, then it's only
natural to bridge libqmp to libvirt.
Regards,
Anthony Liguori
> thanks,
> -chris
>
next prev parent reply other threads:[~2011-03-15 21:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 14:53 [Qemu-devel] KVM call minutes for Mar 15 Chris Wright
2011-03-15 16:28 ` Anthony Liguori
2011-03-15 19:06 ` Chris Wright
2011-03-15 21:05 ` Anthony Liguori [this message]
2011-03-17 10:34 ` [libvirt] " Daniel P. Berrange
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=4D7FD49C.7070108@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=chrisw@redhat.com \
--cc=clalance@redhat.com \
--cc=jdenemar@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=libvir-list@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).