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

Re: [vfio-users] Cannot register eventfd with MSI/MSI-X interrupts

On Tue, 2 Aug 2016 09:54:19 -0600
Alex Williamson <alex williamson redhat com> wrote:

> On Tue, 2 Aug 2016 10:21:30 +0000
> chris thompson <the_cartographer hotmail com> wrote:
> > Hi Alex,
> >  
> > Thanks for your patience, I noticed the count != 0 issue shortly after, but I get the same EINVAL error anyway when it is zero - but this is because the IRQ does not have a mapping yet. When I change the code to map it then unmap it then I get:
> > IRQx - successful map then unmap
> > MSI - unsuccessful map (and unsuccessful unmap)
> > MSIX - successful map then unmap (despite the device still being in IRQx mode?)
> > Error - successfully map, kernel driver crash on the unmap!  

I remembered that there is a trick here specific to MSI, your device
probably supports more than one MSI vector.  MSI is a little bit
special, not all platforms support multiple MSI vectors and they were
pretty much outdated by the much more flexible MSI-X capability for
that reason.  To help with this the SET_IRQS ioctl returns negative on
error, 0 on success, and a positive value indicating the available
vectors to retry with if the requested count is not supported/available.

BTW, this should fix the oops you found:


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