Received: from eggs.gnu.org ([2001:4830:134:3::10]:38317) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adkXL-0003Qx-6u for qemu-devel@nongnu.org; Wed, 09 Mar 2016 15:16:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1adkXH-0007ZI-MW for qemu-devel@nongnu.org; Wed, 09 Mar 2016 15:16:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39753) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1adkXH-0007ZB-Ho for qemu-devel@nongnu.org; Wed, 09 Mar 2016 15:16:47 -0500 From: Markus Armbruster References: <1457378754-21649-1-git-send-email-armbru@redhat.com> <1457378754-21649-23-git-send-email-armbru@redhat.com> Date: Wed, 09 Mar 2016 21:16:44 +0100 In-Reply-To: (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Wed, 9 Mar 2016 13:45:20 +0100") Message-ID: <877fhb2yqb.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 22/42] ivshmem: Leave INTx alone when using MSI-X List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: Paolo Bonzini , cam , Claudio Fontana , QEMU , David Marchand Marc-Andr=C3=A9 Lureau writes: > Hi > > On Mon, Mar 7, 2016 at 8:25 PM, Markus Armbruster wro= te: >> The ivshmem device can either use MSI-X or legacy INTx for interrupts. >> >> With MSI-X enabled, peer interrupt events trigger an MSI as they >> should. But software can still raise INTx via interrupt status and >> mask register in BAR 0. This is explicitly prohibited by PCI Local >> Bus Specification Revision 3.0, section 6.8.3.3: >> >> While enabled for MSI or MSI-X operation, a function is prohibited >> from using its INTx# pin (if implemented) to request service (MSI, >> MSI-X, and INTx# are mutually exclusive). >> >> Fix the device model to leave INTx alone when using MSI-X. >> >> Document that we claim to use INTx in config space even when we don't. >> Unlike other devices, ivshmem does *not* use INTx when configured for >> MSI-X and MSI-X isn't enabled by software. >> >> Signed-off-by: Markus Armbruster >> --- >> hw/misc/ivshmem.c | 9 +++++++++ >> 1 file changed, 9 insertions(+) >> >> diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c >> index cfea151..fc37feb 100644 >> --- a/hw/misc/ivshmem.c >> +++ b/hw/misc/ivshmem.c >> @@ -126,6 +126,11 @@ static void ivshmem_update_irq(IVShmemState *s) >> PCIDevice *d =3D PCI_DEVICE(s); >> uint32_t isr =3D s->intrstatus & s->intrmask; >> >> + /* No INTx with msi=3Doff, whether the guest enabled MSI-X or not */ >> + if (ivshmem_has_feature(s, IVSHMEM_MSI)) { >> + return; > > So you probably mean msi=3Don You're right. > with that > Reviewed-by: Marc-Andr=C3=A9 Lureau Thanks! [...]