Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp888769pxb; Wed, 27 Oct 2021 14:31:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpNEwJSL5LSXxefcB+GspC03WW4F1js3m2/ZuIymwS7R+ZxQJc6WKNRrIXpcaln7tSQ6J3 X-Received: by 2002:aa7:df83:: with SMTP id b3mr25030edy.305.1635370279898; Wed, 27 Oct 2021 14:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370279; cv=none; d=google.com; s=arc-20160816; b=yt0sV3Lbkj5+/vesTp3FOojsD7XcAEWRlsVkQogEwwyttyQEUWyF+36w7Puzc0K+4O bUq7JJ1S0eU1oreJ3E3jPXK46wwWlx1/g9QHy21kR73vhb5t6BRIsDaITgnXU2gmFksR v0xPcZSU2uoKo93+2e7ctxJ2NvCE6uuKBN1ZeK+M2V74WH5/p5DrPBhhR0OZgV+LMyv/ ZMpAN7TMP/ha95g3nbMeB8h1KgP2RwfqU+YvKncJGopP6Ja652OBuvVeV6QU979fa9B4 +DrdNUlmQlXlShH4DQfhsoYdGGM6T0L6YQvjFNgY3a49yIjb1C3fPPZWMJb1Pl2leBOX 4zhw== 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 :cc:to:subject:dkim-signature; bh=RTbh0FOZiixU1YclazL/a05rHxCiwpeE87PCafx1Bsc=; b=M2MVfzP9c3uI2+uCiZ4Eur5Qz7JPvJUJG/Ck8vglq+5P5T1s13EooLcfULlswCZqcQ LRK1gfbv6LeG6WUt463/limqRQRUIE+zIGEM22gJbgPZ+HK82XYhgnFHyMj2p3vpk0gw p0O0cXhZrVPfnPsYCFH5ADJCDxagNzhwGm8UG5LjAImlNAoI4JJ6RXq9i+9SmlxUQWfQ Si+2dDgZvtncxzyX6q9YTZwwKNtFLuJQeui81OmCD6NogjCZWQkoyApwGvDLK+xxXk3z bccsDm4ktV17SySCIikRntqhLSX6toH8USxbeMKDwYcpL9L6UnSmEDKopb+yELbigeFX ANiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VUr+PHvd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt11si1733973ejc.393.2021.10.27.14.30.56; Wed, 27 Oct 2021 14:31:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=VUr+PHvd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S233321AbhJ0Pgw (ORCPT + 97 others); Wed, 27 Oct 2021 11:36:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:41231 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232502AbhJ0Pgv (ORCPT ); Wed, 27 Oct 2021 11:36:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635348865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RTbh0FOZiixU1YclazL/a05rHxCiwpeE87PCafx1Bsc=; b=VUr+PHvdFFVKyarirmP+HJvHLWy2+KSJQkr4t5i00WfaFey9xJn0XHcJUc6RU9YnALQMUG EnX8GZPMFndZT6AJgLz2O+9qik7Iqvm9piEQ7oVZyOJ1ZwHdS2xRX4C/DP0RoKpmWd9w9q bifxb38yRP4qbKQfU3mhF/1rCEEkKrA= Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-166-0nFkpLnuNLWU_18HhFu7oA-1; Wed, 27 Oct 2021 11:34:24 -0400 X-MC-Unique: 0nFkpLnuNLWU_18HhFu7oA-1 Received: by mail-pl1-f199.google.com with SMTP id u1-20020a170903124100b0013fd0e97269so1400647plh.10 for ; Wed, 27 Oct 2021 08:34:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=RTbh0FOZiixU1YclazL/a05rHxCiwpeE87PCafx1Bsc=; b=aKfPkYAwblSX2Z3AzX/CoHKoeKdByJGZa2PG6Xojh/ZJqH0XFc78iuGWk3n1qnNsX/ SpgzgNJmde+cDqg7vkxIbNnN5A1Lg2Emnrf7NtRT4a8zrAPR5aby1EK96hnEbfgxvV5j KiIMfPL2I3UQqNZE83PJ9jyO0fxABVYa0jDFNUmRIlRNKmEo9Y7/ENbqxvULahFh7ohU pw1aLb61s6/g8dGh7vb/s/3zEIm6FYgMXw9JcyArsQD6k1PC3Y2Km1B2aozUHFQBdyOT /DLMP/gl6ouKbjm7UrHKAiPUVqEUudpEZwm8oj/RfSk9evtR/3kB60lwB8KjXzS0I1h5 mCHA== X-Gm-Message-State: AOAM5320Ylb6SJyZqZWXIBHT7HWhBf7m03CqgNrgP43nz1cG0T7MVWMp X4DBU6ZJ4ry4v8dzFQ5un12TlkWv+wmLh6slZPPJv/Uf1ycs3zcSEuaKTcE3QvJHGCAQtMajdQo 0rVmKo1rBCEwU6o7dCPk1aHCv X-Received: by 2002:a17:90a:ae12:: with SMTP id t18mr6667003pjq.137.1635348862861; Wed, 27 Oct 2021 08:34:22 -0700 (PDT) X-Received: by 2002:a17:90a:ae12:: with SMTP id t18mr6666961pjq.137.1635348862521; Wed, 27 Oct 2021 08:34:22 -0700 (PDT) Received: from localhost.localdomain (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id q8sm375129pfk.75.2021.10.27.08.34.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Oct 2021 08:34:22 -0700 (PDT) Subject: Re: [PATCH v17 0/5] FPGA Image Load (previously Security Manager) To: Russ Weight , "Wu, Hao" , "Xu, Yilun" Cc: "mdf@kernel.org" , "linux-fpga@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "lgoncalv@redhat.com" , "Gerlach, Matthew" References: <20211013010617.GE95330@yilunxu-OptiPlex-7050> <58036b2d-ca8f-2deb-f1b4-0301d633714b@intel.com> <20211014014947.GF95330@yilunxu-OptiPlex-7050> <7d1971d0-b50b-077f-2a82-83d822cd2ad7@intel.com> <20211015025140.GH95330@yilunxu-OptiPlex-7050> <2b26bea5-60d3-6763-00e8-9a94fa0bf45b@intel.com> <20211018081356.GB40070@yilunxu-OptiPlex-7050> <301850cf-9f34-530b-bd9c-fbe9bf9feee5@intel.com> <20211019025356.GC40070@yilunxu-OptiPlex-7050> <85d56e4b-5bed-693d-4f76-027173a6e7a0@intel.com> <20211020011608.GA145760@yilunxu-OptiPlex-7050> <38cfb530-8826-7890-da59-c1dd33b9cc7d@intel.com> <03ff4983-d8a9-6ad7-a655-a8dcde3da360@intel.com> From: Tom Rix Message-ID: <4664128f-1a08-aed9-ca4f-563b7da62883@redhat.com> Date: Wed, 27 Oct 2021 08:34:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/27/21 8:11 AM, Russ Weight wrote: > > On 10/26/21 8:29 PM, Wu, Hao wrote: >>>>>> The API should not only define what it won't do, but also define what >>>>>> it will do. But the "image load" just specifies the top half of the >>>>>> process. So I don't think this API would be accepted. >>>>> So what is the path forward. It seems like you are saying >>>>> that the self-describing files do not fit in the fpga-mgr. >>>>> Can we reconsider the FPGA Image Load Framework, which does >>>>> not make any assumptions about the contents of the image >>>>> files? >>>> Why we need such "generic data transfer" interface in FPGA >>>> framework? >>> Are you referring to the use of self-describing files? >>> or the generic nature of this class driver? >> Yes, why this is under FPGA framework? Per your description that >> it can be used to transfer any data, e.g. BMC images, some device >> specific data (self-describing image?). Let's take this as example, >> if FPGA device is replaced with ASIC on N3000, do you still want >> to use FPGA image load framework to transfer your device specific >> data, e.g. BMC images? I really hope that FPGA framework code only >> focus on common usage of FPGA. >> >>>> we need to handle the common need for FPGA >>>> devices only, not all devices, like programming FPGA images. >>>> So far we even don't know, what's the hardware response on >>>> these self-describing files, how we define it as a common need >>>> interface in the framework? >>> The class driver does not _need_ to reside in the FPGA >>> framework. I sent an inquiry to the maintainer of the >>> Firmware update subsystem (and cc'd the kernel mailing list) >>> and received no responses. I placed it under the FPGA >>> framework only because the first user of the class driver >>> is an FPGA driver. >> You must have enough justifications why this needs to be included >> for everybody not for our own case. > How do we justify it when there are currently no other known > users? I can go ahead and work up some patches for the firmware > subsystem, if we can resolve the other concerns below. > >>>> If you just want to reuse the >>>> fpga-mgr/framework code for your own purpose, Yes, it seems >>>> saving some code for you, but finally it loses flexibility, as it's >>>> not possible to extend common framework for your own >>>> purpose in the future. >>> If I understand correctly, you are saying that it doesn't >>> fit well in the FPGA manager, because not all file types >>> fit the definition of a firmware update? And future file >>> types may not fit in fpga-mgr context? >> Let's split the use cases, I think the use case that update a persistent >> storage for FPGA image, and later use hardware logic (FPGA loader) >> to load it into FPGA. This sounds like a common usage for FPGA >> devices, so I think this is why Yilun propose to have this part to be >> covered by fpga-mgr. But for other cases in your description, e.g. >> BMC images, device specific data, self-describing image and etc, >> they are out of scope of FPGA. > Self-describing files are not something new to us; _ALL_ of the image > files that we send to our FPGA cards, including the N3000 FPGA and BMC > images, root-entry hashes, key cancellations, etc. are self-describing > files. They always have been. > > >> Actually I don't fully understand why we need to introduce the >> "self-describing image" as a common data transfer interface, if >> I remember correctly, for N3000, different sub drivers will own >> different hardware sub function blocks, why expose such a new >> shared communication channel? > There is no change here. The N3000 files are self describing. The > secure-update sub-driver of the MAX10 BMC invokes the class driver, > funnels image data to the BMC, performs handshakes with the BMC, > and ultimately returns status through the class driver. All images > that are sent to the FPGA card follow this same path - and it works > fine. > > To try to split out the purposes of each self-describing file to > use different kernel APIs means interfacing multiple class drivers > to the same MAX10 sub-driver. I think it also means replicating > code. Could the split be ? add max10 bits mfd/ move image updating out of the kernel and into an uio driver Tom > > - Russ >> If "self-describing image" is a >> request to one of the sub function block, why not just expose >> new interface in such hardware block per modularization? I >> have some concern that this new requirement may break >> current driver architecture for N3000. >> >> Hao >> >>> - Russ >>>> Thanks >>>> Hao