On 02/03/2016 12:04, Markus Armbruster wrote:
> For better or worse, fallback to INTx has never been implemented in
> ivshmem.  You can either ask for an INTx-only device (msi=off), or for
> an MSI-X-only device (msi=on).  The latter *cannot* do interrupts until
> you enable MSI-X.

Aha, now I see what you mean:

    if (ivshmem_has_feature(s, IVSHMEM_MSI)) {
        msix_notify(pdev, vector);
    } else {
        ivshmem_IntrStatus_write(s, 1);
    }

So I believe your patch is okay.  Perhaps you could also change the
interrupt pin for new machine types (even without changing the
revision), but it's not necessary to do it.

> Similarly, the ivshmem-doorbell device introduced later in this series
> can only do MSI-X, and the ivshmem-plain device cannot do interrupts at
> all.

Here:

    dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin 1 */

Paolo

Reply via email to