From patchwork Tue Jul 2 22:32:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 1126524 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45dfF03BZlz9sBp for ; Wed, 3 Jul 2019 08:34:44 +1000 (AEST) Received: from localhost ([::1]:58046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiRMI-0000Dh-4r for incoming@patchwork.ozlabs.org; Tue, 02 Jul 2019 18:34:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57312) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiRKs-0000Cs-0S for qemu-devel@nongnu.org; Tue, 02 Jul 2019 18:33:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiRKm-0004Ik-6F for qemu-devel@nongnu.org; Tue, 02 Jul 2019 18:33:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60966) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiRKh-0004BC-En for qemu-devel@nongnu.org; Tue, 02 Jul 2019 18:33:04 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1FDE43082A6C; Tue, 2 Jul 2019 22:33:02 +0000 (UTC) Received: from gimli.home (ovpn-116-83.phx2.redhat.com [10.3.116.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C27C19635; Tue, 2 Jul 2019 22:32:57 +0000 (UTC) From: Alex Williamson To: qemu-devel@nongnu.org Date: Tue, 02 Jul 2019 16:32:57 -0600 Message-ID: <156210677697.19884.9077927453622553047.stgit@gimli.home> In-Reply-To: <156210666074.19884.7711861336532593819.stgit@gimli.home> References: <156210666074.19884.7711861336532593819.stgit@gimli.home> User-Agent: StGit/0.19-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Tue, 02 Jul 2019 22:33:02 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/2] vfio-common.h: Remove inaccurate comment X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eric.auger@redhat.com, farosas@linux.ibm.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Fabiano Rosas This is a left-over from "f4ec5e26ed vfio: Add host side DMA window capabilities", which added support to more than one DMA window. Signed-off-by: Fabiano Rosas Acked-by: David Gibson Signed-off-by: Alex Williamson --- include/hw/vfio/vfio-common.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index a88b69b6750e..9107bd41c030 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -74,11 +74,6 @@ typedef struct VFIOContainer { int error; bool initialized; unsigned long pgsizes; - /* - * This assumes the host IOMMU can support only a single - * contiguous IOVA window. We may need to generalize that in - * future - */ QLIST_HEAD(, VFIOGuestIOMMU) giommu_list; QLIST_HEAD(, VFIOHostDMAWindow) hostwin_list; QLIST_HEAD(, VFIOGroup) group_list; From patchwork Tue Jul 2 22:33:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 1126525 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45dfL22kf0z9sBp for ; Wed, 3 Jul 2019 08:39:03 +1000 (AEST) Received: from localhost ([::1]:58070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiRQT-00039u-3g for incoming@patchwork.ozlabs.org; Tue, 02 Jul 2019 18:39:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57438) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiRKz-0000GK-Sr for qemu-devel@nongnu.org; Tue, 02 Jul 2019 18:33:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiRKx-0004ZP-PK for qemu-devel@nongnu.org; Tue, 02 Jul 2019 18:33:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36748) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiRKu-0004NG-0Y for qemu-devel@nongnu.org; Tue, 02 Jul 2019 18:33:17 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id ACFD9C049589; Tue, 2 Jul 2019 22:33:12 +0000 (UTC) Received: from gimli.home (ovpn-116-83.phx2.redhat.com [10.3.116.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4E36411B; Tue, 2 Jul 2019 22:33:07 +0000 (UTC) From: Alex Williamson To: qemu-devel@nongnu.org Date: Tue, 02 Jul 2019 16:33:07 -0600 Message-ID: <156210678718.19884.1742619809608268205.stgit@gimli.home> In-Reply-To: <156210666074.19884.7711861336532593819.stgit@gimli.home> References: <156210666074.19884.7711861336532593819.stgit@gimli.home> User-Agent: StGit/0.19-dirty MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 02 Jul 2019 22:33:12 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/2] vfio/pci: Trace vfio_set_irq_signaling() failure in vfio_msix_vector_release() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: eric.auger@redhat.com, farosas@linux.ibm.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Eric Auger Report an error in case we fail to set a trigger action on any VFIO_PCI_MSIX_IRQ_INDEX subindex. This might be useful in debugging a device that is not working properly. Signed-off-by: Eric Auger Reported-by: Coverity (CID 1402196) Signed-off-by: Alex Williamson --- hw/vfio/pci.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index ce3fe96efe2c..d7a4e1875c05 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -551,9 +551,12 @@ static void vfio_msix_vector_release(PCIDevice *pdev, unsigned int nr) */ if (vector->virq >= 0) { int32_t fd = event_notifier_get_fd(&vector->interrupt); + Error *err = NULL; - vfio_set_irq_signaling(&vdev->vbasedev, VFIO_PCI_MSIX_IRQ_INDEX, nr, - VFIO_IRQ_SET_ACTION_TRIGGER, fd, NULL); + if (vfio_set_irq_signaling(&vdev->vbasedev, VFIO_PCI_MSIX_IRQ_INDEX, nr, + VFIO_IRQ_SET_ACTION_TRIGGER, fd, &err)) { + error_reportf_err(err, VFIO_MSG_PREFIX, vdev->vbasedev.name); + } } }