qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: Michael Roth <mdroth@linux.vnet.ibm.com>
Cc: agl@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com,
	markus_mueller@de.ibm.com, qemu-devel@nongnu.org,
	Jes.Sorensen@redhat.com, abeekhof@redhat.com
Subject: [Qemu-devel] Re: [RFC][PATCH v7 00/16] virtagent: host/guest communication agent
Date: Mon, 07 Mar 2011 18:24:59 -0600	[thread overview]
Message-ID: <4D75775B.5020309@us.ibm.com> (raw)
In-Reply-To: <4D757429.20108@linux.vnet.ibm.com>

On 03/07/2011 06:11 PM, Michael Roth wrote:
> On 03/07/2011 04:56 PM, Anthony Liguori wrote:
>> On 03/07/2011 04:49 PM, Michael Roth wrote:
>>> It's not really inventing anything. We've always started off with
>>> qobject params, which we then pulled apart and stuck into xmlrpc
>>> params, which when then turned into xml for transport. Now we just
>>> take the qobjects and covert them to json directly. We've only cut out
>>> an intermediate library and switched to a different UTF8-based
>>> encoding for transport.
>>>
>>> With QAPI we'd have the extra step of pulling function parameters into
>>> a qobjects. Not any different from what the situation would've been
>>> using xmlrpc or any of the other binary encoding that were considered.
>>>
>>> It does look more similar to what QMP/QAPI is doing than previously,
>>> but it doesn't need to be all or nothing.
>>
>> I think I have a Clever Idea here but hacking together a prototype.
>>
>> Basic thinking is to make guest commands part of the QMP namespace such
>> that a guest command looks like any other QMP command. The only role
>> QEMU plays in this model is validating the commands inputs and outputs
>> and then passing the command to the guest agent.
>
> Hmm...this does sound nice. But keep in mind that not all parameters 
> passed in via QMP were intended solely for the guest. That just 
> happens to be the case for the RPCs we have implemented in this RFC.
>
> For instance, one of QMP commands we intended to add for the new 
> getfile implementation, to address concerns over a hardcoded file size 
> limit while avoiding large memory allocations on the host or guest, 
> was chunked file transfer using a set of stateful RPCs, with a higher 
> level QMP command to wrap them:

Just as HMP commands can be implemented in terms of QMP commands, QMP 
commands can be implemented in terms of QMP commands.

Regards,

Anthony Liguori

>
> qmp.getfile <local file> <remote file>
>
> Where <local file> could be a normal file, or "-" for direct output to 
> monitor. Internally, the set of actual RPCs being executed are much 
> lower level. Something like:
>
> offset = 0
> local_fd = open(<local file>)
> remote_fd = va.open(<remote file>)
> while (((read_count, buf) = va.read(remote_fd, offset, 512*1024)) > 0):
>   write(local_fd, buf, read_count)
>   offset += read_count
> va.close(remote_fd)
>
> Any higher-level commands of this type would be still doable, but 
> would need to be pushed all the way up to the management stack, or 
> done programatically, so it does limit what can be done within an 
> interactive shell. Some might argue that's for the best, but there may 
> be more of a trade-off in other possible use cases.
>
>>
>> Stay tuned.
>>
>> Regards,
>>
>> Anthony Liguori
>>
>>>
>>>>
>>>> Regards,
>>>>
>>>> Anthony Liguori
>>>>
>>>
>>
>

      reply	other threads:[~2011-03-08  0:25 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-07 20:10 [Qemu-devel] [RFC][PATCH v7 00/16] virtagent: host/guest communication agent Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions Michael Roth
2011-03-09 13:58   ` [Qemu-devel] " Paolo Bonzini
2011-03-09 14:11     ` Michael Roth
2011-03-09 14:38       ` Paolo Bonzini
2011-03-09 15:01         ` Michael Roth
2011-03-09 15:15           ` Paolo Bonzini
2011-03-09 14:28     ` Anthony Liguori
2011-03-09 14:40     ` Anthony Liguori
2011-03-09 14:45       ` Paolo Bonzini
2011-03-09 15:39         ` Anthony Liguori
2011-03-09 14:09   ` Paolo Bonzini
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 02/16] Add qemu_set_fd_handler() wrappers to qemu-tools.c Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 03/16] Make qemu timers available for tools Michael Roth
2011-03-09 10:33   ` [Qemu-devel] " Jes Sorensen
2011-03-09 13:04     ` Michael Roth
2011-03-09 13:06       ` Jes Sorensen
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 04/16] virtagent: bi-directional RPC handling logic Michael Roth
2011-03-07 21:24   ` [Qemu-devel] " Adam Litke
2011-03-07 22:35     ` Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 05/16] virtagent: common helpers and init routines Michael Roth
2011-03-09 10:38   ` [Qemu-devel] " Jes Sorensen
2011-03-09 13:17     ` Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 06/16] virtagent: transport definitions Michael Roth
2011-03-07 21:38   ` [Qemu-devel] " Adam Litke
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 07/16] virtagent: base RPC client definitions Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 08/16] virtagnet: base RPC server definitions Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 09/16] virtagent: add va_capabilities HMP/QMP command Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 10/16] virtagent: add "ping" RPC to server Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 11/16] virtagent: add va_ping HMP/QMP command Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 12/16] virtagent: add "shutdown" RPC to server Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 13/16] virtagent: add va_shutdown HMP/QMP command Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 14/16] virtagent: add virtagent chardev Michael Roth
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 15/16] virtagent: qemu-va, system-level virtagent guest agent Michael Roth
2011-03-09 10:48   ` [Qemu-devel] " Jes Sorensen
2011-03-07 20:10 ` [Qemu-devel] [RFC][PATCH v7 16/16] virtagent: add bits to build virtagent host/guest components Michael Roth
2011-03-07 21:43 ` [Qemu-devel] Re: [RFC][PATCH v7 00/16] virtagent: host/guest communication agent Anthony Liguori
2011-03-07 22:49   ` Michael Roth
2011-03-07 22:56     ` Anthony Liguori
2011-03-08  0:11       ` Michael Roth
2011-03-08  0:24         ` Anthony Liguori [this message]

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=4D75775B.5020309@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=abeekhof@redhat.com \
    --cc=agl@linux.vnet.ibm.com \
    --cc=markus_mueller@de.ibm.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.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 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).