diff options
Diffstat (limited to 'hw/vfio/device.c')
| -rw-r--r-- | hw/vfio/device.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/hw/vfio/device.c b/hw/vfio/device.c index 9673b0717e..5d837092cb 100644 --- a/hw/vfio/device.c +++ b/hw/vfio/device.c @@ -185,6 +185,21 @@ bool vfio_device_irq_set_signaling(VFIODevice *vbasedev, int index, int subindex return false; } +int vfio_device_get_irq_info(VFIODevice *vbasedev, int index, + struct vfio_irq_info *info) +{ + int ret; + + memset(info, 0, sizeof(*info)); + + info->argsz = sizeof(*info); + info->index = index; + + ret = ioctl(vbasedev->fd, VFIO_DEVICE_GET_IRQ_INFO, info); + + return ret < 0 ? -errno : ret; +} + int vfio_device_get_region_info(VFIODevice *vbasedev, int index, struct vfio_region_info **info) { |