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

Stefan Berger stefanb at linux.vnet.ibm.com
Fri Feb 6 20:19:12 UTC 2015


On 02/06/2015 03:11 PM, Eric Blake wrote:
> On 02/06/2015 12:19 PM, Stefan Berger wrote:
>
>> virCommandReorderFDs is not used on WIN32 -- that would then mean that
>> the fdsets could not be used on WIN32 or a different return value would
>> have to be given here. Like
>>
>> return cmd->npassfd -1
>>
>> on WIN32 ?
> virCommand in general has problems on WIN32, so returning failure for
> now may be reasonable.
>
>
We could just leave the function virCommandPassFd as is. Anyone who 
wants to build a QEMU /dev/fdset string would have to go through the 
function that looks up the fd the child will see and will fail on WIN32.

Then the problem would be reduced to just having the file descriptors 
reordered every time -- a simple change in the code, unless we only 
wanted to do the re-ordering if someone was building a /dev/fdset string 
and as part of the fd lookup a flag was set requesting re-ordering. I 
would not expect any side effects in existing code except that maybe 
test cases would have to be adapted.

    Stefan




More information about the libvir-list mailing list