[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC Patch 1/3] chardev: add new socket fd parameter fo
From: |
Eric Blake |
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 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
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 <address@hidden>
> ---
> 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
signature.asc
Description: OpenPGP digital signature