[libvirt] [PATCH v3] qemu: Pass file descriptor when using TPM passthrough

Eric Blake eblake at redhat.com
Fri Feb 6 23:27:27 UTC 2015


On 02/06/2015 04:12 PM, Stefan Berger wrote:

> 
> it's not that simple unfortunately; if we started to re-order / re-map
> using dup() the file descriptors then all fd's that make it onto the
> command line, like those for -netdev and others, also need to be adapted
> to have that re-ordered fd on the command line.

Correct, and that's what I hope to accomplish by making fd registration
enforce that the caller check the return value, to make sure that
-netdev is now constructing the command line with the fd the child will
see rather than what the parent owns.  Yes, it means auditing all
existing callers.

> Conversely, this
> currently prevents us from ordering the file descriptors as well, since
> nothing would work without code change. So ordering the file descriptors
> cannot currently be done with anything that builds up a QEMU command
> line. So do we really need to re-order them then as part of this code
> change?

I think that a pre-req series that orders fds in the child for all
callers, independent of adding your new TPM features, will be a good
thing in the long run.  So I'm currently working on said series. :)

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150206/543a3ff4/attachment-0001.sig>


More information about the libvir-list mailing list