Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1393910
| From | "Saxena, Nitin" <Nitin.Saxena@caviumnetworks.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: VFIO MSIX Query |
| Date | 2016-05-04 04:50 +0200 |
| Message-ID | <ruV2W-3qB-1@gated-at.bofh.it> (permalink) |
| References | <ruV2W-3qB-3@gated-at.bofh.it> <ruONP-6p2-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Got it. Thanks Alex. I may have future queries as well on this. Will get back to you. Thanks, Nitin > On 04-May-2016, at 01:33, Alex Williamson <alex.williamson@redhat.com> wrote: > > Hi, > > On Tue, 3 May 2016 23:56:38 +0530 > Nitin Saxena <nitin.lnx@gmail.com> wrote: > >> Hi, >> >> I am a newbie to VFIO framework and trying to use it for MSIX interrupt >> handling in my userspace application. My userspace application is like >> intel's dpdk. >> >> My query is why vfio kernel code does not support msix masking/ unmasking >> i.e VFIO_SET_ACTION_TRIGGER is not implemented in kernel vfio code for MSIX >> but its present for legacy INTX? > > I think you mean VFIO_IRQ_SET_ACTION_MASK and > VFIO_IRQ_SET_ACTION_UNMASK are not implemented for MSI/X, > VFIO_IRQ_SET_ACTION_TRIGGER is the only one that is implemented. It > mostly comes down to it hasn't been needed. We would just need to > verify that disable_irq() and enable_irq() do the right thing and > enable the features through the existing VFIO API. The reason we have > these for INTx is that INTx is level triggered and we must mask the > interrupt on the host while it's serviced by the user because the > interrupt will continue to assert and we have no service guarantees > from the user. MSI/X is of course edge triggered, so doesn't have this > problem. The device would need to continue to re-assert the > interrupt. In cases like a QEMU user, we might want to continue to > receive guest masked interrupts to QEMU for emulating the pending bits > array, so even if we had VFIO masking support for these interrupts, QEMU > probably would not use it. If MSI/X masking is useful for you vs simply > ignoring the eventfd, patches welcome. > >> Another question since MSIX interrupt masking is absent in kernel who is >> supposed to mask/unmask msix interrupt? does userspace needs to mask/unmask >> interrupt after getting notified by eventfd. Is there any usecase where >> MSIX handling is done via VFIO framework? > > MSI/X is edge triggered and VFIO does not set the AUTOMASKED flag on > them, so there is simply no masking of them at all aside from fully > disabling them. QEMU has full support for MSI/X through VFIO that you > can use for reference. Thanks, > > Alex
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: VFIO MSIX Query Alex Williamson <alex.williamson@redhat.com> - 2016-05-03 22:10 +0200
Re: VFIO MSIX Query "Saxena, Nitin" <Nitin.Saxena@caviumnetworks.com> - 2016-05-04 04:50 +0200
Fwd: VFIO MSIX Query Nitin Saxena <nitin.lnx@gmail.com> - 2016-05-07 18:00 +0200
Re: VFIO MSIX Query Alex Williamson <alex.williamson@redhat.com> - 2016-05-08 04:00 +0200
Re: VFIO MSIX Query Alex Williamson <alex.williamson@redhat.com> - 2016-05-09 17:30 +0200
csiph-web