qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v1 14/24] vfio-user: get and set IRQs


From: John Johnson
Subject: Re: [PATCH v1 14/24] vfio-user: get and set IRQs
Date: Tue, 13 Dec 2022 23:10:29 +0000


> On Dec 13, 2022, at 8:39 AM, Cédric Le Goater <clg@redhat.com> 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

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