Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3353138rwa; Tue, 23 Aug 2022 03:25:02 -0700 (PDT) X-Google-Smtp-Source: AA6agR4IffIMMo7qSOhWxTt5I5HIbq0Qkc4V7/wGbEs4YXmTdHBgDifDqwXS2uL6t6KZfH/pIIIg X-Received: by 2002:a05:6402:4442:b0:43b:c866:21be with SMTP id o2-20020a056402444200b0043bc86621bemr3177347edb.28.1661250302685; Tue, 23 Aug 2022 03:25:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661250302; cv=none; d=google.com; s=arc-20160816; b=oNGUc7kW+4BVCkxXQCQpHdPnFwUE3HECsLXBg6BYju3Gyf6FppXn+2Ni4EvzEfCI2o btH8nWERrMGqR4j7/zwlb7ev5zZ4l+4HhW/aiiqpgy4TfTyBr7zCDS/2RDXZFfb5dgyD u7HzVRY2+X9EQp8xvHh9w7Nd7hyGD3EUgUospSB+Xf+P0dI6nzjO9o6eeGptmsYVVyaE O87DXNV2Nq7bT4bAzxt6XIagRdypv16a+5BoAcHAfgnCchLqy94eMIPi1yu8hxrwB3uU YHbgr43lIJrTsYRlBTCA6qTYAgaK01fQJWUCVHy54IlcN1YvmtzDdRC/NhWfPPJ9wmU9 KvUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sqBJSb5urmJsYMxu9CKgmtLWPubc7BIoTe17OEoKvNk=; b=ZFwQaU7Gmyp3pMylGMmmMBBZCSqHcxlbruq6UJim44Dbl9sOlAnssMUXD9TbK/7tD2 30mV3oALjudJ8uKZmIcrtlww2ksybhKspfclMVQh6czU99ciuqmhrj5VX0V1b42TY7BE oo/3ytaemNOTL3BW/0gjkl9g0BkWMf5uF/bU3lCI+k0QXOgTJcXgSb9DrYr7v6Mid3NZ KRSJzT8i1z1Di1NDbUP4E42r/fhxZ8/XOEC2CB4jTrx+wefAMgX0n/kdm1yj4nGfSg3y eL9d2MemvZQ/NFXG2r7TcztN3GgTs4CHvfd4gkj0T9bbrNo0G67+IARrPFbCngyJT4AK HK4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yEmWpu9M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c10-20020a05640227ca00b0043c4912e226si1996529ede.568.2022.08.23.03.24.37; Tue, 23 Aug 2022 03:25:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yEmWpu9M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354350AbiHWKVR (ORCPT + 99 others); Tue, 23 Aug 2022 06:21:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352899AbiHWKJc (ORCPT ); Tue, 23 Aug 2022 06:09:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA935101A; Tue, 23 Aug 2022 01:55:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6BDF7B81C28; Tue, 23 Aug 2022 08:55:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85182C433D6; Tue, 23 Aug 2022 08:55:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661244921; bh=CZzuY3a27j4F+CBOVWD7MeVGBQoD3tKsr9GhoUeeke8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yEmWpu9Mdt84IVcXApBygCnemvkbzxr88LPPDv+Jzy6nKW352C33CEd/PaWnTeqNU E7GkXr2Nd7/8nJOIVLAOqSMln0lFPLgDguOJeBwaUPP6kOFMtXhfBQ3wworNQWDc8H wCgSoW+lqdVdNcrn5U9RuPH8jXLG5zCtLNdAgC1E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavan Chebbi , Michael Chan , Bjorn Helgaas , Sasha Levin Subject: [PATCH 4.14 212/229] PCI: Add ACS quirk for Broadcom BCM5750x NICs Date: Tue, 23 Aug 2022 10:26:13 +0200 Message-Id: <20220823080101.216525898@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pavan Chebbi [ Upstream commit afd306a65cedb9589564bdb23a0c368abc4215fd ] 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. Link: https://lore.kernel.org/r/1654796507-28610-1-git-send-email-michael.chan@broadcom.com Signed-off-by: Pavan Chebbi Signed-off-by: Michael Chan Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/quirks.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 98327966e5b4..0a116359b5c7 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -4760,6 +4760,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 }, { 0 } }; -- 2.35.1