On 01/03/2016 18:14, Marc-André Lureau wrote:
> > + /*
> > + * Note: we don't use INTx with IVSHMEM_MSI at all, so this is a
> > + * bald-faced lie then. But it's a backwards compatible lie.
> > + */
> > pci_config_set_interrupt_pin(pci_conf, 1);
>
> I am not sure how much of a problem this is. Apparently, other devices
> claim interrupt and msi (ich, hda, pvscsi)
>
> Better ask someone more familiar with PCI details.
The interrupt pin is read-only and just helps the OS figure out which
interrupt is routed to intx. If you return early from
ivshmem_update_irq if IVSHMEM_MSI, you should skip this line too.
I think it's better to leave this line in and check
if (msix_enabled(pci_dev)) {
return;
}
in ivshmem_update_irq instead. This matches what xhci does, for example.
Paolo