vfio/cdx: add interrupt support
authorNipun Gupta <nipun.gupta@amd.com>
Tue, 23 Apr 2024 11:10:21 +0000 (16:40 +0530)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 23 Apr 2024 20:31:38 +0000 (14:31 -0600)
commit848e447e000c41894ff931dc7c004fd42c8840f8
tree41c970d9c36e5b0477fb18c9007e5b7a96d0b697
parent06fe8fd6808562971637c6b133c806bcf49097ad
vfio/cdx: add interrupt support

Support the following ioctls for CDX devices:
- VFIO_DEVICE_GET_IRQ_INFO
- VFIO_DEVICE_SET_IRQS

This allows user to set an eventfd for cdx device interrupts and
trigger this interrupt eventfd from userspace.
All CDX device interrupts are MSIs. The MSIs are allocated from the
CDX-MSI domain.

Signed-off-by: Nipun Gupta <nipun.gupta@amd.com>
Reviewed-by: Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@amd.com>
Link: https://lore.kernel.org/r/20240423111021.1686144-2-nipun.gupta@amd.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/vfio/cdx/Makefile
drivers/vfio/cdx/intr.c [new file with mode: 0644]
drivers/vfio/cdx/main.c
drivers/vfio/cdx/private.h