vfio: fix disabling INTx
The flags member of irq_set should be ORed with VFIO_IRQ_SET_ACTION_MASK and not VFIO_IRQ_SET_ACTION_UNMASK. The bug was found by code inspection. Fixes: 5c782b3928b8 ("vfio: interrupts") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
This commit is contained in:
parent
468f42cc26
commit
bb7927fd21
@ -194,14 +194,14 @@ vfio_disable_intx(const struct rte_intr_handle *intr_handle) {
|
||||
irq_set = (struct vfio_irq_set *) irq_set_buf;
|
||||
irq_set->argsz = len;
|
||||
irq_set->count = 1;
|
||||
irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_UNMASK;
|
||||
irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_MASK;
|
||||
irq_set->index = VFIO_PCI_INTX_IRQ_INDEX;
|
||||
irq_set->start = 0;
|
||||
|
||||
ret = ioctl(intr_handle->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set);
|
||||
|
||||
if (ret) {
|
||||
RTE_LOG(ERR, EAL, "Error unmasking INTx interrupts for fd %d\n",
|
||||
RTE_LOG(ERR, EAL, "Error masking INTx interrupts for fd %d\n",
|
||||
intr_handle->fd);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user