Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1280795pxm; Thu, 3 Mar 2022 14:09:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJ1M4YlFIci7kSp7utfA4+suYi1MJsqib+hbMimFBKCWErd1DReJzkMdS4dHsOrKNMy4/v X-Received: by 2002:a17:907:3e82:b0:6da:6f15:ff38 with SMTP id hs2-20020a1709073e8200b006da6f15ff38mr7412416ejc.324.1646345367011; Thu, 03 Mar 2022 14:09:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646345367; cv=none; d=google.com; s=arc-20160816; b=M9BUDAPNavhWQKh4VTq/201aqZH99zUH1RrnDAtSiPiW4Ip0BP1H8/PwnFY9fUkD4q SQdrhmbH7JYfLVIHYxRSAHEugGreKKbKmj1ummyFmoOuCTWa5rWYte2UJCuChSDdy3Tb KgCJdexOpRW8uBboUnQZaZhmeK4MVivrZH2lDarBwM8Vvu6yM+70H6q2KPVrfWuB+4oi RfOZnxm3weeKzjOs0T1Bc0uBfumN0WM3NCh62VUCfLvdi7j/ystE70THE9MusFdBD3dN MEiD0b2T2aLI/klQarsg1ijGSbmmyeyuW41Jx1g4uw6x0uUV6ZhfkMj8bO7dG9IHfq/X FEyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :to:subject:dkim-signature; bh=6wGROgyYuQGjMhOFoWGJ+5bmZEJUNDacGYc0J6ktUME=; b=OY4hcXpKQ+slVcVfAacL+Dh/Onzd0CPvx+zEtgAjNAjq92QE+ES/FEk53Z1NyUbLgO DbjY8luVEHG+U6V0WvHyUuKBp3s4SiU+sSdRFFqCF6MEeyGtBA0AYGSxYfEG6VtmvXjn wJgM9+Qy9DGcoeC++jBf3JkaD/ZqfPI9kduN6n/wHrpcFTbOjCYBN2JR9VcJmE08AN25 1+oIaLLO7/boeAxa9kq3WbUkQgETw/w9SwIQGpVivV21HIjqYzj3KcecIkYB6RVOql5K wPIbuKTefYvqDgx8zIY3ubKFj1jOkfl2cqEc4c8Nq0G9yFUbXuBL30uzK26bPvbJ4yBJ oRBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OA2cvRkU; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dz22-20020a0564021d5600b00415c2f4884dsi2925261edb.575.2022.03.03.14.09.04; Thu, 03 Mar 2022 14:09:27 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b=OA2cvRkU; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231664AbiCCWEz (ORCPT + 99 others); Thu, 3 Mar 2022 17:04:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235784AbiCCWEy (ORCPT ); Thu, 3 Mar 2022 17:04:54 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F2DF6148643 for ; Thu, 3 Mar 2022 14:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646345046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6wGROgyYuQGjMhOFoWGJ+5bmZEJUNDacGYc0J6ktUME=; b=OA2cvRkUgEUX361sLeF1kTZnuygjni7P1yPpTP32GO9MoQjiGgMSeflwq78/kk/ureZ1t4 FKEdfTPXSIUCVyFTZ1WV+xqlgtkzVgK1zSlVTv8h8y9oxzV14ZPc3YbS+UF1cyZXsP2e0B du9jeggcmp6PYbxdJbKoYpd+dxnu6CA= Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-499-RKjLFzSANJq-wQng3_50xw-1; Thu, 03 Mar 2022 17:04:05 -0500 X-MC-Unique: RKjLFzSANJq-wQng3_50xw-1 Received: by mail-oo1-f69.google.com with SMTP id s7-20020a4aeac7000000b0031d808633fbso4429605ooh.10 for ; Thu, 03 Mar 2022 14:04:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=6wGROgyYuQGjMhOFoWGJ+5bmZEJUNDacGYc0J6ktUME=; b=Nlq/UktNYzKs+H5onEOEl/AqOkqlcBRwld5cQYjcmggFyPn/6yj9S4Fr291YSzcPmP 4p23VgZBuVdpNJiNVNmwBo+cn92XnnGK8C5VTa0iHejshw5aNd7/yuJAaGzY8XfbBY+g LFjdc0QM0m74oJ9Z81UXl5Ss4VbAjONDxgTZezzCUq7oNxSFwKBxwfbPMHJuxF3vsEJ6 253z2mOS3NdlJOArdVfCCFPxOveQFZKf6znSZhaGNC3CltZih5jTXCBcUiXQZSrXmsU9 SjIu8ZKpqez6NghhtzlzHu70lAi3A7uaOJS9FFjuvOMK7G9Cy8YVVKj8EHiA7If3LoV2 fn3g== X-Gm-Message-State: AOAM533nFsNX00SUObsI5j7U5AIkMPgCf+dwbnvVf+7IDPKcpCu2X/jI jLawhQv4JeTLUb/zsfudsoWyqfTg4dU2RAF5IpWAKIZ82q+8KoDAO/fgDcPpr/K9rYd3hkNsPoa t5RnIyZHwJlRV9RZcs1a2bfvr X-Received: by 2002:aca:1a04:0:b0:2d4:f855:aad1 with SMTP id a4-20020aca1a04000000b002d4f855aad1mr6496536oia.63.1646345043704; Thu, 03 Mar 2022 14:04:03 -0800 (PST) X-Received: by 2002:aca:1a04:0:b0:2d4:f855:aad1 with SMTP id a4-20020aca1a04000000b002d4f855aad1mr6496506oia.63.1646345043499; Thu, 03 Mar 2022 14:04:03 -0800 (PST) Received: from localhost.localdomain (024-205-208-113.res.spectrum.com. [24.205.208.113]) by smtp.gmail.com with ESMTPSA id q7-20020a9d6647000000b005af185bf273sm1582024otm.25.2022.03.03.14.04.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Mar 2022 14:04:02 -0800 (PST) Subject: Re: [PATCH v2 1/2] Documentation: fpga: dfl: add PCI Identification documentation To: matthew.gerlach@linux.intel.com, hao.wu@intel.com, yilun.xu@intel.com, russell.h.weight@intel.com, basheer.ahmed.muddebihal@intel.com, mdf@kernel.org, corbet@lwn.net, linux-fpga@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dan.j.williams@intel.com, ashok.raj@intel.com, tianfei.zhang@intel.com References: <20220303003534.3307971-1-matthew.gerlach@linux.intel.com> <20220303003534.3307971-2-matthew.gerlach@linux.intel.com> From: Tom Rix Message-ID: <6448f21f-7ce1-d9ce-1048-29aca14f9d3d@redhat.com> Date: Thu, 3 Mar 2022 14:04:00 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20220303003534.3307971-2-matthew.gerlach@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 3/2/22 4:35 PM, matthew.gerlach@linux.intel.com wrote: > From: Matthew Gerlach > > Add documentation on identifying FPGA based PCI cards prompted > by discussion on the linux-fpga@vger.kernel.org mailing list. > > Signed-off-by: Matthew Gerlach > --- > v2: Introduced in v2. > --- > Documentation/fpga/dfl.rst | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > > diff --git a/Documentation/fpga/dfl.rst b/Documentation/fpga/dfl.rst > index ef9eec71f6f3..5fb2ca8e76d7 100644 > --- a/Documentation/fpga/dfl.rst > +++ b/Documentation/fpga/dfl.rst > @@ -502,6 +502,26 @@ Developer only needs to provide a sub feature driver with matched feature id. > FME Partial Reconfiguration Sub Feature driver (see drivers/fpga/dfl-fme-pr.c) > could be a reference. > > +PCI Device Identification > +================================ > +Since FPGA based PCI cards can be reconfigured to a perform a completely > +new function at runtime, properly identifying such cards and binding the > +correct driver can be challenging. In many use cases, deployed FPGA based > +PCI cards are essentially static and the PCI Product ID and Vendor ID pair > +is sufficient to identify the card. The DFL framework helps with the > +dynamic case of deployed FPGA cards changing at run time by providing > +more detailed information about card discoverable at runtime. > + > +At one level, the DFL on a PCI card describes the function of the card. > +However, the same DFL could be instantiated on different physical cards. > +Conversely, different DFLs could be instantiated on the same physical card. > +Practical management of a cloud containing a heterogeneous set of such cards > +requires a PCI level of card identification. While the PCI Product ID and > +Vendor ID may be sufficient to bind the dfl-pci driver, it is expected > +that FPGA PCI cards would advertise suitable Subsystem ID and Subsystem > +Vendor ID values. PCI Vital Product Data (VPD) can also be used for > +more granular information about the board. This describes a bit more of the problem, it should describe it wrt ofs dev id. The introduction of the ofs dev should be explicitly called out as a generic pci id. Why couldn't one of the old pci id's be reused ? How will the subvendor/subid be enforced ? Is the current security manager patchset smart enough to save the board from being bricked when a user doesn't look beyond the pci id ? What happens if a board uses this device id but doesn't have a max10 to do the update ? Tom > + > Location of DFLs on a PCI Device > ================================ > The original method for finding a DFL on a PCI device assumed the start of the