Re: [Qemu-devel] [PATCH v5] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-13 Thread Alex Williamson
On Wed, 12 Jun 2019 14:40:04 +0200 Eric Auger wrote: > 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 m

Re: [Qemu-devel] [PATCH v5] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-13 Thread Auger Eric
Hi Li, On 6/13/19 1:40 AM, Li Qiang wrote: > Eric Auger 于2019年6月12日周三 下午8:40写道: > >> 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_

Re: [Qemu-devel] [PATCH v5] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-13 Thread Auger Eric
Hi Connie, On 6/12/19 6:46 PM, Cornelia Huck wrote: > On Wed, 12 Jun 2019 14:40:04 +0200 > Eric Auger wrote: > >> 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_TRIGG

Re: [Qemu-devel] [PATCH v5] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Li Qiang
Eric Auger 于2019年6月12日周三 下午8:40写道: > 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

Re: [Qemu-devel] [PATCH v5] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Cornelia Huck
On Wed, 12 Jun 2019 14:40:04 +0200 Eric Auger wrote: > 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 m

[Qemu-devel] [PATCH v5] vfio/common: Introduce vfio_set_irq_signaling helper

2019-06-12 Thread Eric Auger
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