From patchwork Thu Jun 9 17:41:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12875863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B563C433EF for ; Thu, 9 Jun 2022 17:42:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345050AbiFIRmI (ORCPT ); Thu, 9 Jun 2022 13:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345041AbiFIRmH (ORCPT ); Thu, 9 Jun 2022 13:42:07 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0D1517127F for ; Thu, 9 Jun 2022 10:42:03 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id j7so21961287pjn.4 for ; Thu, 09 Jun 2022 10:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=GRcSKoQ34Lq2HbYWsnm1NHd+Ged5KrZqvp/p9rDvN9E=; b=XWo7WuCydC3qs71ECIaY1pfLVGCIaZp+Zhqd2TW5G/dy8PJEAkCbEYrzy0ycw8FUgI Whjj1Ihq3Tw9YORoHa3sMlGALJWYI30/ysWEfWrogEJX4YqAJYWu71GOqNUcKK93lEnx JGwp3HjF4E7w0SrMWsqMl023/byPPe/WTTP3M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GRcSKoQ34Lq2HbYWsnm1NHd+Ged5KrZqvp/p9rDvN9E=; b=YHEGIsGNYdXdcSsPbbMpgka9MOge2nlFKUbm/5cxa+EXaKRBWq9kLk3kDEYYOAENmJ NVOD/RZzPOzrlfe4pOzJB2OhMPVx130/nMmAkNDpUBRvQ5w1JdjRBcnU+/qHT3WPn2io ebLHJef7iaLqapJfFayoy4v6M2AXdbHhqFEETahmycs/2LGBRMlCd1oCuNFoB6oCS2mY uDZOB+D0QaX28DnrNGru9sY3lJZn/ELq+78sh8iI5qY74yFudsg3OFp0uhYXQdX0Mw/b NyJQ5ZewOIU6eiivESrCaCg7jlBHnVgXxArsepHsl3k+jtO/v8kcohZG47SBpZY3DhQJ Qs+w== X-Gm-Message-State: AOAM531S0bMAM+0UJB+RLO9xE0sL/orbz63FsoutF4q3w9eN/vhrL3r2 7zL7Gk2HcnGZq8vbaDaD35RoDiCzqDlF9w== X-Google-Smtp-Source: ABdhPJwRlbtbr0GCQRj1CEhOVH3lG5ctmmuyA8OgZCX/OcByW/yp8Ocd8eA6mWoIruWjGHeJyoqNEA== X-Received: by 2002:a17:90b:1b49:b0:1e6:a23:69c6 with SMTP id nv9-20020a17090b1b4900b001e60a2369c6mr4453174pjb.124.1654796522612; Thu, 09 Jun 2022 10:42:02 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id r16-20020a635150000000b003f65560a1a7sm17451580pgl.53.2022.06.09.10.42.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jun 2022 10:42:01 -0700 (PDT) From: Michael Chan To: davem@davemloft.net, bhelgaas@google.com Cc: netdev@vger.kernel.org, linux-pci@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com, Pavan Chebbi Subject: [PATCH] PCI: Add ACS quirk for Broadcom BCM5750x NICs Date: Thu, 9 Jun 2022 13:41:47 -0400 Message-Id: <1654796507-28610-1-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Pavan Chebbi The Broadcom BCM5750x NICs may be multi-function devices. They do not advertise ACS capability. Peer-to-peer transactions are not possible between the individual functions, so it is safe to treat them as fully isolated. Add an ACS quirk for these devices so the functions can be in independent IOMMU groups and attached individually to userspace applications using VFIO. Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan --- drivers/pci/quirks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 41aeaa235132..2e68f50bc7ae 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4924,6 +4924,9 @@ static const struct pci_dev_acs_enabled { { PCI_VENDOR_ID_AMPERE, 0xE00C, pci_quirk_xgene_acs }, /* Broadcom multi-function device */ { PCI_VENDOR_ID_BROADCOM, 0x16D7, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1750, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1751, pci_quirk_mf_endpoint_acs }, + { PCI_VENDOR_ID_BROADCOM, 0x1752, pci_quirk_mf_endpoint_acs }, { PCI_VENDOR_ID_BROADCOM, 0xD714, pci_quirk_brcm_acs }, /* Amazon Annapurna Labs */ { PCI_VENDOR_ID_AMAZON_ANNAPURNA_LABS, 0x0031, pci_quirk_al_acs },