qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [libvirt] [PATCH v4 0/7] file descriptor passing using


From: Kevin Wolf
Subject: Re: [Qemu-devel] [libvirt] [PATCH v4 0/7] file descriptor passing using pass-fd
Date: Wed, 27 Jun 2012 10:58:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 26.06.2012 20:40, schrieb Corey Bryant:
>>> Here is a quick proof of concept (ie untested) patch to demonstrate
>>> what I mean. It relies on Cory's patch which converts everything
>>> to use qemu_open. It is also still valuable to make the change
>>> to qemu_open() to support "/dev/fd/N" for passing FDs during
>>> QEMU initial startup for CLI args.
>>>
>>> IMHO, what I propose here is preferrable for QMP clients that
>>> our current plan of requiring use of 3 monitor commands (passfd,
>>> XXXXX, closefd).
>>
>> Thanks for the PoC.
>>
>> Two other required updates that I can think of would be:
>>
>> 1) Update change, block_stream, block_reopen, snapshot_blkdev, and
>> perhaps other monitor commands to support receiving fd's via SCM_RIGHTS.
>>
> 
> Nevermind my comment.  I see that your PoC supports passing nfds for any 
> QMP command.
> 
> I'm curious what Kevin's thoughts are on this and the overall approach.

I'm not against introducing this nfd thing as a general feature for QMP
commands instead of a separate pass-fd command. It's not obvious to me
that everyone would agree with that, so let's CC Luiz at least.

The that I'm unsure about is what we should do with qemu reopening the
file. If you close the fd immediately, you obviously can't do that any
more. Even worse, libvirt doesn't have a unique ID for each passed file
descriptor any more, so even though we have introduced a QMP feature for
file descriptor passing, we would still need to touch all commands to
allow assigning a new fd.

I think having one stable original fd that libvirt can refer to is much
nicer.

Kevin



reply via email to

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