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: 12875864 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 7BC2CC43334 for ; Thu, 9 Jun 2022 17:42:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245679AbiFIRmI (ORCPT ); Thu, 9 Jun 2022 13:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345042AbiFIRmH (ORCPT ); Thu, 9 Jun 2022 13:42:07 -0400 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3348172C23 for ; Thu, 9 Jun 2022 10:42:03 -0700 (PDT) Received: by mail-pj1-x102e.google.com with SMTP id k5-20020a17090a404500b001e8875e6242so10856514pjg.5 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=NQintIORWYanhX7ZZPSMHEPVlxJ1MOgUTvUwdfDNzHo=; b=M1KT+8maZEFov6kfJcWF2Siw15JiRDSHZ19EfHblxEu4shcshilj1C8uym6C6cHyP/ XZnD694o+Yu0ngsK3jEge+l6QtY3L11ttAiib6GqmrO6QCqYQ2vo87qpHFDlPxPp8Yxa sm75ns7Mbs27x2bjJGAF0jZMKJxbl2371Ts3k= 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=NQintIORWYanhX7ZZPSMHEPVlxJ1MOgUTvUwdfDNzHo=; b=TM0oxhh8ypnXStVPnuOemMP3O0CEKkzcjcWQBIYPTfItTwqW/XGunYV3uzq1NmoRuu s+68oIsA3yslMQPAGsHnqjycyDXlJ/cntim0BRMdrYKXZ/cDI4rFtuYWcL2qb5o8ix9Q NyKP6rA7cChVJkaN68si9fuE3BLa8eu/fBvzGt1EhDknJ9xnyDaabu27SECwirJ3boFC 8uiGDhV5VuswbZ3sO6EnAE2uo2E7tI3vWpbjApqgpIqe1o8Gp0bDILD21iMl4srGHcS3 9rA2rsR6p5wc4M44CGkSMBHHv2GD7ABvizqUzptaOVFNdcwhgYLb11aYWcDTEfiuC93u 3tDg== X-Gm-Message-State: AOAM533tR4+7nlh3cmv0mZyhYdwgEifzlueL0ESQdkjyOzHK3p/T5je1 NtB6T56fmJvVRMrC4ZCJghL2HA== 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: linux-pci@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 },