From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id DA040CF8A for ; Tue, 28 Mar 2017 17:19:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490714388; x=1522250388; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=E8jD8dZA84JAI7B+txFAcglEGCu7Z6PGEG7skoBwVf8=; b=UhYz9KA3RHc0CFWCHOYpKqJo0IFlAhpNksp7rTuPJlLQQTZPlQ6YT2P3 cf8lbRHIrE2kXvajcZKKBAy7jGeHRg==; Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Mar 2017 08:19:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,236,1486454400"; d="scan'208";a="81919450" Received: from unknown (HELO localhost.iind.intel.com) ([10.224.122.216]) by fmsmga006.fm.intel.com with ESMTP; 28 Mar 2017 08:19:45 -0700 From: Nikhil Rao To: anatoly.burakov@intel.com Cc: dev@dpdk.org Date: Wed, 29 Mar 2017 05:24:07 +0530 Message-Id: <1490745247-32001-1-git-send-email-nikhil.rao@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1490742934-30608-1-git-send-email-nikhil.rao@intel.com> References: <1490742934-30608-1-git-send-email-nikhil.rao@intel.com> Subject: [dpdk-dev] [PATCH v2] vfio: Fix vfio disable INTx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2017 15:19:48 -0000 The flags member of irq_set should be ORed with VFIO_IRQ_SET_ACTION_MASK and not VFIO_IRQ_SET_ACTION_UNMASK. The bug was found by code inspection. Fixes: 5c782b3928b8 (\"vfio: interrupts\") Signed-off-by: Nikhil Rao --- Changes since v1: * Better summary * Fix error message lib/librte_eal/linuxapp/eal/eal_interrupts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c index 5bb833e..029a147 100644 --- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c +++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c @@ -194,14 +194,14 @@ vfio_disable_intx(const struct rte_intr_handle *intr_handle) { irq_set = (struct vfio_irq_set *) irq_set_buf; irq_set->argsz = len; irq_set->count = 1; - irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_UNMASK; + irq_set->flags = VFIO_IRQ_SET_DATA_NONE | VFIO_IRQ_SET_ACTION_MASK; irq_set->index = VFIO_PCI_INTX_IRQ_INDEX; irq_set->start = 0; ret = ioctl(intr_handle->vfio_dev_fd, VFIO_DEVICE_SET_IRQS, irq_set); if (ret) { - RTE_LOG(ERR, EAL, "Error unmasking INTx interrupts for fd %d\n", + RTE_LOG(ERR, EAL, "Error masking INTx interrupts for fd %d\n", intr_handle->fd); return -1; } -- 2.7.4