From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab92r-0001i0-PD for qemu-devel@nongnu.org; Wed, 02 Mar 2016 10:50:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ab92o-0003Kt-Hm for qemu-devel@nongnu.org; Wed, 02 Mar 2016 10:50:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33427) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ab92o-0003Ko-Bj for qemu-devel@nongnu.org; Wed, 02 Mar 2016 10:50:34 -0500 From: Markus Armbruster References: <1456771254-17511-1-git-send-email-armbru@redhat.com> <1456771254-17511-19-git-send-email-armbru@redhat.com> <56D5D19D.7030609@redhat.com> <87y4a1m97y.fsf@blackfin.pond.sub.org> <56D6F594.1010005@redhat.com> Date: Wed, 02 Mar 2016 16:50:30 +0100 In-Reply-To: <56D6F594.1010005@redhat.com> (Paolo Bonzini's message of "Wed, 2 Mar 2016 15:15:48 +0100") Message-ID: <87egbsj2ux.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 18/38] ivshmem: Leave INTx alone when using MSI-X List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau , cam , Claudio Fontana , QEMU , David Marchand Paolo Bonzini writes: > 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. I can try to explain it a bit better in the comment and/or commit message when I respin. > 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. I chose not to bother, because after PATCH 34, the non-deprecated devices are all revision 1 (correct Interrupt Pin register). >> 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 */ Ah! I looked only for pci_config_set_interrupt_pin().