From patchwork Mon Mar 21 12:32:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 8632421 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7BE8A9F294 for ; Mon, 21 Mar 2016 12:32:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB5A120212 for ; Mon, 21 Mar 2016 12:32:24 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 086932017E for ; Mon, 21 Mar 2016 12:32:19 +0000 (UTC) Received: from localhost ([::1]:57505 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ahz0M-0006qw-3o for patchwork-qemu-devel@patchwork.kernel.org; Mon, 21 Mar 2016 08:32:18 -0400 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 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6A240C049D4F; Mon, 21 Mar 2016 12:32:06 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-41.ams2.redhat.com [10.36.116.41]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2LCW4JL026304 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 21 Mar 2016 08:32:05 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id DFD44303F90D; Mon, 21 Mar 2016 13:32:03 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: claudio.fontana@huawei.com, cam@cs.ualberta.ca, mlureau@redhat.com, david.marchand@6wind.com, pbonzini@redhat.com Subject: Re: [Qemu-devel] [PATCH v3 36/40] ivshmem: Split ivshmem-plain, ivshmem-doorbell off ivshmem X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }