Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support VFIO_IRQ_INFO_MASKABLE #806

Open
jlevon opened this issue Oct 23, 2024 · 2 comments
Open

support VFIO_IRQ_INFO_MASKABLE #806

jlevon opened this issue Oct 23, 2024 · 2 comments

Comments

@jlevon
Copy link
Collaborator

jlevon commented Oct 23, 2024

We have some plumbing for mask/unmask (see #694) but never report VFIO_IRQ_INFO_MASKABLE, so in theory we should never hit that code.

However, it appears that qemu vfio-user client is doing it anyway for INTX, although not for msix

Need to figure out what the proper behaviour should be.

@jlevon
Copy link
Collaborator Author

jlevon commented Oct 23, 2024

vfio-pci

1181         if (info.index == VFIO_PCI_INTX_IRQ_INDEX)                               
1182                 info.flags |=                                                    
1183                         (VFIO_IRQ_INFO_MASKABLE | VFIO_IRQ_INFO_AUTOMASKED);     

@jlevon
Copy link
Collaborator Author

jlevon commented Oct 24, 2024

we should probably always report INTX as maskable, and actually respect that.

For MSI-X, as need to do #807 and also handle a trigger while masked. I think that looks like:

  • setting the pending bit into the PBA on vfu_trigger_irq(msix index)
  • accept mask/unmask operations
  • on unmask, trigger eventfd for any pending bits

In theory API user could do this too, but seems better handled in the library. And perhaps we need a better MSI-X set up API than we currently have for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant