From patchwork Mon Aug 13 08:35:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 176871 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9CB292C0098 for ; Mon, 13 Aug 2012 18:39:20 +1000 (EST) Received: from localhost ([::1]:52034 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0qBC-0003uI-Ir for incoming@patchwork.ozlabs.org; Mon, 13 Aug 2012 04:39:18 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0qB0-0003sA-Gf for qemu-devel@nongnu.org; Mon, 13 Aug 2012 04:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T0qAy-00042D-Qf for qemu-devel@nongnu.org; Mon, 13 Aug 2012 04:39:06 -0400 Received: from mail.linux-iscsi.org ([67.23.28.174]:44867 helo=linux-iscsi.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T0qAy-000426-Le for qemu-devel@nongnu.org; Mon, 13 Aug 2012 04:39:04 -0400 Received: from linux-iscsi.org (localhost [127.0.0.1]) by linux-iscsi.org (Postfix) with ESMTP id DD52422D9D1; Mon, 13 Aug 2012 08:35:25 +0000 (UTC) From: "Nicholas A. Bellinger" To: target-devel Date: Mon, 13 Aug 2012 08:35:12 +0000 Message-Id: <1344846917-7411-2-git-send-email-nab@linux-iscsi.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1344846917-7411-1-git-send-email-nab@linux-iscsi.org> References: <1344846917-7411-1-git-send-email-nab@linux-iscsi.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 67.23.28.174 Cc: Anthony Liguori , Stefan Hajnoczi , kvm-devel , "Michael S. Tsirkin" , Jan Kiszka , qemu-devel , Nicholas Bellinger , Zhi Yong Wu , Anthony Liguori , Hannes Reinecke , Paolo Bonzini , lf-virt , Christoph Hellwig Subject: [Qemu-devel] [RFC-v2 1/6] msix: Work-around for vhost-scsi with KVM in-kernel MSI injection 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Nicholas Bellinger This is required to get past the following assert with: commit 1523ed9e1d46b0b54540049d491475ccac7e6421 Author: Jan Kiszka Date: Thu May 17 10:32:39 2012 -0300 virtio/vhost: Add support for KVM in-kernel MSI injection Cc: Stefan Hajnoczi Cc: Jan Kiszka Cc: Paolo Bonzini Cc: Anthony Liguori Signed-off-by: Nicholas Bellinger --- hw/msix.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 800fc32..c1e6dc3 100644 --- a/hw/msix.c +++ b/hw/msix.c @@ -544,6 +544,9 @@ void msix_unset_vector_notifiers(PCIDevice *dev) { int vector; + if (!dev->msix_vector_use_notifier && !dev->msix_vector_release_notifier) + return; + assert(dev->msix_vector_use_notifier && dev->msix_vector_release_notifier);