On Mon, Jan 28, 2013 at 02:54:28PM -0700, Eric Blake wrote:
On 01/26/2013 09:17 PM, Stefan Berger wrote:
>> In a subsequent patch we now test inside that function whether the new
>> command line parameter is available using the capability (from another
>> patch) and create fd=/dev/set/10 and vhostfd=/dev/set/20 respectively
>> *and* already add "-add-fd set=10,fd=21" and "-add-fd
set=20,fd=23" to
>> virCommand using the functions I already posted (as the lowest layer).
>>
>> Would it be that simple, or do we need to add more parameters to
>> -add-fd set=10,fd=21,xyz under certain circumstances?
Ideally, we'd also want to use the opaque parameter of each -add-fd
call, so that when we later use QMP commands to query what fdsets exist,
the opaque parameter can tell us what filenames we passed in (it makes
bookkeeping easier if you know that fd 5 was tied to /dev/tpm, compared
to just knowing that it is an open fd but not what it came from).
That implies that you trust the output from QEMU monitor commands
to be telling you the truth. We can't do that, so IMHO we can't
rely on the 'opaque' parameter.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|