Received: from eggs.gnu.org ([2001:4830:134:3::10]:40815) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahz0E-0006qm-J1 for qemu-devel@nongnu.org; Mon, 21 Mar 2016 08:32:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ahz0B-0002UP-CY for qemu-devel@nongnu.org; Mon, 21 Mar 2016 08:32:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57298) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahz0B-0002UL-6c for qemu-devel@nongnu.org; Mon, 21 Mar 2016 08:32:07 -0400 From: Markus Armbruster References: <1458066895-20632-1-git-send-email-armbru@redhat.com> <1458066895-20632-37-git-send-email-armbru@redhat.com> Date: Mon, 21 Mar 2016 13:32:03 +0100 In-Reply-To: <1458066895-20632-37-git-send-email-armbru@redhat.com> (Markus Armbruster's message of "Tue, 15 Mar 2016 19:34:51 +0100") Message-ID: <87oaa83tbw.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 36/40] ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: claudio.fontana@huawei.com, cam@cs.ualberta.ca, mlureau@redhat.com, david.marchand@6wind.com, pbonzini@redhat.com >From 74b97a070bdadb4343a63c7f214bcda30a0ab37e Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 21 Mar 2016 13:12:10 +0100 Subject: [PATCH] fixup! ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem ivshmem_update_irq() must not touch INTx when the device doesn't use it. The obvious guard would be the Interrupt Pin register in PCI config space. However, since device ivshmem sets it even when it doesn't have INTx, we check property "msi" instead. For the new ivshmem-plain, we do need to check config space. --- hw/misc/ivshmem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c index 18f6802..32ca70f 100644 --- a/hw/misc/ivshmem.c +++ b/hw/misc/ivshmem.c @@ -146,7 +146,8 @@ static void ivshmem_update_irq(IVShmemState *s) uint32_t isr = s->intrstatus & s->intrmask; /* No INTx with msi=on, whether the guest enabled MSI-X or not */ - if (ivshmem_has_feature(s, IVSHMEM_MSI)) { + if (ivshmem_has_feature(s, IVSHMEM_MSI) + || !d->config[PCI_INTERRUPT_PIN]) { return; } -- 2.4.3