mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
vfio/common: Introduce vfio_set_irq_signaling helper
The code used to assign an interrupt index/subindex to an eventfd is duplicated many times. Let's introduce an helper that allows to set/unset the signaling for an ACTION_TRIGGER, ACTION_MASK or ACTION_UNMASK action. In the error message, we now use errno in case of any VFIO_DEVICE_SET_IRQS ioctl failure. Signed-off-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Li Qiang <liq3ea@gmail.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
c60807dea5
commit
201a733145
4 changed files with 151 additions and 208 deletions
|
@ -166,6 +166,8 @@ void vfio_put_base_device(VFIODevice *vbasedev);
|
|||
void vfio_disable_irqindex(VFIODevice *vbasedev, int index);
|
||||
void vfio_unmask_single_irqindex(VFIODevice *vbasedev, int index);
|
||||
void vfio_mask_single_irqindex(VFIODevice *vbasedev, int index);
|
||||
int vfio_set_irq_signaling(VFIODevice *vbasedev, int index, int subindex,
|
||||
int action, int fd, Error **errp);
|
||||
void vfio_region_write(void *opaque, hwaddr addr,
|
||||
uint64_t data, unsigned size);
|
||||
uint64_t vfio_region_read(void *opaque,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue