From patchwork Tue Aug 12 11:48:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Shan X-Patchwork-Id: 4712381 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66372C0338 for ; Tue, 12 Aug 2014 11:48:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 95E8D20170 for ; Tue, 12 Aug 2014 11:48:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6FD9D20127 for ; Tue, 12 Aug 2014 11:48:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752644AbaHLLsZ (ORCPT ); Tue, 12 Aug 2014 07:48:25 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:58736 "EHLO e28smtp08.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752613AbaHLLsZ (ORCPT ); Tue, 12 Aug 2014 07:48:25 -0400 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 12 Aug 2014 17:18:20 +0530 Received: from d28dlp01.in.ibm.com (9.184.220.126) by e28smtp08.in.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 12 Aug 2014 17:18:18 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id B7AB8E0018 for ; Tue, 12 Aug 2014 17:20:16 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s7CBmddr59506918 for ; Tue, 12 Aug 2014 17:18:39 +0530 Received: from d28av02.in.ibm.com (localhost [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s7CBmGR6014436 for ; Tue, 12 Aug 2014 17:18:16 +0530 Received: from shangw (shangw.cn.ibm.com [9.125.213.222]) by d28av02.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with SMTP id s7CBmFEx014369; Tue, 12 Aug 2014 17:18:15 +0530 Received: by shangw (Postfix, from userid 1000) id 0F3253E1242; Tue, 12 Aug 2014 21:48:11 +1000 (EST) From: Gavin Shan To: linux-pci@vger.kernel.org Cc: amirv@mellanox.com, alex.williamson@redhat.com, eli@mellanox.com, weiyang@linux.vnet.ibm.com, Gavin Shan Subject: [PATCH v3] PCI: Mark broken INTx masking for Mellanox devices Date: Tue, 12 Aug 2014 21:48:11 +1000 Message-Id: <1407844091-20815-1-git-send-email-gwshan@linux.vnet.ibm.com> X-Mailer: git-send-email 1.8.3.2 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14081211-2000-0000-0000-0000017FD0F4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 The VFIO driver is routing LSI interrupts by capturing, masking, and then delivering. When passing though Mellanox adapters from host to guest, interrupt storm was reported from host and guest. That's because we can't mask the LSI interrupt with help of PCI command register. # lspci | grep Mellanox 0001:05:00.0 Ethernet controller: Mellanox Technologies MT27500 \ Family [ConnectX-3] 0005:01:00.0 Ethernet controller: Mellanox Technologies MT26448 \ [ConnectX EN 10GigE, PCIe 2.0 5GT/s] (rev b0) It's confirmed by Amir Vadai that all Mellanox devices have same problem. The patch marks broken INTx masking for all Mellanox adapters. Cc: Amir Vadai Suggested-by: Benjamin Herrenschmidt Signed-off-by: Gavin Shan Acked-By: Amir Vadai --- v3: Mark broken INTx masking for all Mellanox adapters --- drivers/pci/quirks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 80c2d01..da062d8 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -2985,6 +2985,8 @@ DECLARE_PCI_FIXUP_HEADER(0x1814, 0x0601, /* Ralink RT2800 802.11n PCI */ */ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_REALTEK, 0x8169, quirk_broken_intx_masking); +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MELLANOX, PCI_ANY_ID, + quirk_broken_intx_masking); #ifdef CONFIG_ACPI /*