> On Dec 13, 2022, at 8:39 AM, Cédric Le Goater <[email protected]> wrote:
> 
> On 11/9/22 00:13, John Johnson wrote:
>> 
>> +
>> +        /* must send all valid FDs or all invalid FDs in single msg */
> 
> why is that ?
> 

        This has to do with how VFIO sends FDs to the kernel.  The
ioctl() i/f has an array of FDs, with -1 signifying an invalid one.
FDs can only be sent over a UNIX socket as a single array of them
(all must be valid, no -1 holes in the array).

        In order to emulate the ioctl() use, we’d need to send an
ancillary array to map the ordinal index of irq_data to the ordinal
index of the FDs in the message.  Since multi-FD sends are only done
at device set-up, it seemed simpler to just break them up.

                                                        JJ


Reply via email to