Revision 98cd5a5e
b/hw/vfio_pci.c | ||
---|---|---|
322 | 322 |
* increase them as needed. |
323 | 323 |
*/ |
324 | 324 |
if (vdev->nr_vectors < nr + 1) { |
325 |
int i; |
|
326 |
|
|
327 | 325 |
vfio_disable_irqindex(vdev, VFIO_PCI_MSIX_IRQ_INDEX); |
328 | 326 |
vdev->nr_vectors = nr + 1; |
329 | 327 |
ret = vfio_enable_vectors(vdev, true); |
330 | 328 |
if (ret) { |
331 | 329 |
error_report("vfio: failed to enable vectors, %d\n", ret); |
332 | 330 |
} |
333 |
|
|
334 |
/* We don't know if we've missed interrupts in the interim... */ |
|
335 |
for (i = 0; i < vdev->msix->entries; i++) { |
|
336 |
if (vdev->msi_vectors[i].use) { |
|
337 |
msix_notify(&vdev->pdev, i); |
|
338 |
} |
|
339 |
} |
|
340 | 331 |
} else { |
341 | 332 |
VFIOIRQSetFD irq_set_fd = { |
342 | 333 |
.irq_set = { |
... | ... | |
353 | 344 |
if (ret) { |
354 | 345 |
error_report("vfio: failed to modify vector, %d\n", ret); |
355 | 346 |
} |
356 |
|
|
357 |
/* |
|
358 |
* If we were connected to the hardware PBA we could skip this, |
|
359 |
* until then, a spurious interrupt is better than starvation. |
|
360 |
*/ |
|
361 |
msix_notify(&vdev->pdev, nr); |
|
362 | 347 |
} |
363 | 348 |
|
364 | 349 |
return 0; |
Also available in: Unified diff