disable MSI interrupts */
| 247 | |
| 248 | /* disable MSI interrupts */ |
| 249 | static int |
| 250 | vfio_disable_msi(const struct rte_intr_handle *intr_handle) { |
| 251 | struct vfio_irq_set *irq_set; |
| 252 | char irq_set_buf[IRQ_SET_BUF_LEN]; |
| 253 | int len, ret, vfio_dev_fd; |
| 254 | |
| 255 | len = sizeof(struct vfio_irq_set); |
| 256 | |
| 257 | irq_set = (struct vfio_irq_set *) irq_set_buf; |
| 258 | irq_set->argsz = len; |
| 259 | irq_set->count = 0; |
| 260 | irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_TRIGGER; |
| 261 | irq_set->index = VFIO_PCI_MSI_IRQ_INDEX; |
| 262 | irq_set->start = 0; |
| 263 | |
| 264 | vfio_dev_fd = rte_intr_dev_fd_get(intr_handle); |
| 265 | ret = ioctl(vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set); |
| 266 | if (ret) |
| 267 | RTE_LOG(ERR, EAL, "Error disabling MSI interrupts for fd %d\n", |
| 268 | rte_intr_fd_get(intr_handle)); |
| 269 | |
| 270 | return ret; |
| 271 | } |
| 272 | |
| 273 | /* enable MSI-X interrupts */ |
| 274 | static int |
no test coverage detected