qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Wei Xu <wexu@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC Patch 1/3] chardev: add new socket fd parameter for unix socket
Date: Wed, 22 Jun 2016 09:39:57 -0600	[thread overview]
Message-ID: <576AB14D.7050304@redhat.com> (raw)
In-Reply-To: <576AAE03.3000403@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]

On 06/22/2016 09:25 AM, Wei Xu wrote:
> There has been comments on this patch, but i forgot adding this patch to
> the list, just forward it again.
> 
> When manage VMs via libvirt, qemu ofter runs with limited permission,
> thus qemu can't create a file/socket, this patch is to  add a new
> parameter 'sockfd' to accept fd opened and passed in from libvirt.
> 
> Signed-off-by: Wei Xu <wexu@redhat.com>
> ---
>  qapi-schema.json | 3 ++-
>  qemu-char.c      | 3 +++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 8483bdf..e9f0268 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -2921,7 +2921,8 @@
>  ##
>  { 'struct': 'UnixSocketAddress',
>    'data': {
> -    'path': 'str' } }
> +    'path': 'str',
> +    'sockfd': 'int32' } }

Missing documentation.

This makes the new 'sockfd' parameter mandatory, but SocketAddress is an
input type.  This is not backwards compatible.  At best, you'd want to
make it optional, but I'm not even convinced you want to add it, since
we already can use the magic /dev/fdset/nnn in 'path' to pass an
arbitrary fd if the underlying code uses qemu_open().

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2016-06-22 15:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1464712247-11655-2-git-send-email-wexu@redhat.com>
2016-06-22 15:25 ` [Qemu-devel] [RFC Patch 1/3] chardev: add new socket fd parameter for unix socket Wei Xu
2016-06-22 15:39   ` Eric Blake [this message]
2016-06-22 16:46     ` Wei Xu
2016-06-27 15:47       ` Wei Xu
2016-06-28  6:48       ` Michael S. Tsirkin
2016-06-28  7:37         ` Wei Xu

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=576AB14D.7050304@redhat.com \
    --to=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wexu@redhat.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).