Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3119408pxb; Mon, 16 Nov 2020 06:21:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJwJbMVkIat4DDsku7pcDIgs/Wyn/fIeeZVTiUn/1z7b6EKWuZbF5GUCNawgMRWD8nZQ3ow9 X-Received: by 2002:a17:906:4495:: with SMTP id y21mr15334283ejo.209.1605536509477; Mon, 16 Nov 2020 06:21:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605536509; cv=none; d=google.com; s=arc-20160816; b=bbQcjIl/jlhFmGLH5qmG+hh9/rhXkOi3zpM0R9HtG7SNRgBAVYLFKOpE8LadJUaZHF AzWnjvM7S37ZlV6ghCQ/zYaVn8Rip/5QS8R4Lr1nucgIy7EbtmoFKCnb5XRAL9I+DF5J zXkk/HkbBjnN42qmnW0Wd4Up/hoPlXxOfu5OeGNijrsZOq4MYMjCNw46jiPMHexQwe9j iQ112UmIwgGJRsQkx2z0F3bnYKkbz1Qy2voq8+4u1Q7t6e5yQ5H3IuxPgLF6T+vLkFBq twqGHiTE1u6TFMHX0ksRYu7+690eGqAa5VUmfZDkjbPFjgsHP0xiifZSlj/55Lai6n5U HcCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=xsDI/YhLcgJHuZQvcJXu5Uz7mefnG+fUtYvbQcZeZh8=; b=IXUlasDO9xS5LQ6AWDEdXnSyeOu0KHiO8U4WuRNFnKJE4gaNk4XIrdZBckkTecTaDt JQIHNTpfTCqU3b9zCbadNd6QoWSdwt+l8woOmQzcUfVF0mQUdLxOJW+nVkPiAFN4CKRk Nr1xmBzWWheowVITm87t6gvuh7p/aVYGAAj7TmRdfLk9T/0fW1FTXhW1IMxvotPiqL8Z ZonuZ0dI8FRytLJS1pQPSIpCoYI/3AP3xa8IARzK1Bd+FB7olwONcbX3BbAhm8p1WnrT Y+vygKSPCyfrikhr1FsIXH8w1Ju4rHnuu/5asBmWWBOtEMn8/jW3wyDSi7v4Ud/hhy+0 fSUA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si11301362eja.728.2020.11.16.06.21.25; Mon, 16 Nov 2020 06:21:49 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728926AbgKPOSg (ORCPT + 99 others); Mon, 16 Nov 2020 09:18:36 -0500 Received: from mga17.intel.com ([192.55.52.151]:44670 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726321AbgKPOSg (ORCPT ); Mon, 16 Nov 2020 09:18:36 -0500 IronPort-SDR: ecGEpSvUZTdJbUktNXYpS9f2RSyDdbn6jSX6vy0aQmDf2IpizZ2aH7mjwI3I7+jbnYB+/L9Sau ZNBrwwodM7/Q== X-IronPort-AV: E=McAfee;i="6000,8403,9806"; a="150599749" X-IronPort-AV: E=Sophos;i="5.77,482,1596524400"; d="scan'208";a="150599749" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Nov 2020 06:18:35 -0800 IronPort-SDR: vS8QKsFuJV5rCELUzotlPEHJ/ufDutgE31elHl43XyOc5rl+Tf3XxSTnN9vGHjo7MOwi1LW6xY xB+oUHuc1tcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,482,1596524400"; d="scan'208";a="531863793" Received: from marshy.an.intel.com (HELO [10.122.105.143]) ([10.122.105.143]) by fmsmga006.fm.intel.com with ESMTP; 16 Nov 2020 06:18:34 -0800 Subject: Re: [PATCHv1 4/4] fpga: stratix10-soc: entend driver for bitstream authentication To: Moritz Fischer Cc: trix@redhat.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, dinguyen@kernel.org, sridhar.rajagopal@intel.com, Richard Gong References: <1605204403-6663-1-git-send-email-richard.gong@linux.intel.com> <1605204403-6663-5-git-send-email-richard.gong@linux.intel.com> <20201115191936.GA283592@epycbox.lan> From: Richard Gong Message-ID: <0eb7fa0d-30e6-099f-d104-8a9aea7d8030@linux.intel.com> Date: Mon, 16 Nov 2020 08:39:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20201115191936.GA283592@epycbox.lan> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Moritz, On 11/15/20 1:19 PM, Moritz Fischer wrote: > On Thu, Nov 12, 2020 at 12:06:43PM -0600, richard.gong@linux.intel.com wrote: >> From: Richard Gong >> >> Exten FPGA manager driver to support FPGA bitstream authentication on > Nit: Extend Sorry, I will fix that in version 2. >> Intel SocFPGA platforms. >> >> Signed-off-by: Richard Gong >> --- >> drivers/fpga/stratix10-soc.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/fpga/stratix10-soc.c b/drivers/fpga/stratix10-soc.c >> index 657a70c..8a59365 100644 >> --- a/drivers/fpga/stratix10-soc.c >> +++ b/drivers/fpga/stratix10-soc.c >> @@ -185,7 +185,10 @@ static int s10_ops_write_init(struct fpga_manager *mgr, >> ctype.flags = 0; >> if (info->flags & FPGA_MGR_PARTIAL_RECONFIG) { >> dev_dbg(dev, "Requesting partial reconfiguration.\n"); >> - ctype.flags |= BIT(COMMAND_RECONFIG_FLAG_PARTIAL); >> + ctype.flags |= FPGA_MGR_PARTIAL_RECONFIG; > I think we had this discussion during the original review of the > stratix10-soc driver? Yes, we discussed before. > > Wasn't the point of using the BIT() to not assume alignment of FPGA_MGR > flags and firmware structure? > Yes, we should use BIT(). > The FPGA_MGR_* bits are kernel internal and can therefore change, it > would be unfortunate to end up in a situation where this breaks the FW > interface (assuming firmware uses the value in pass-through which it > looks like is what is happening). In that case, I should use the flag defined in stratix10-soc driver driver. > >> + } else if (info->flags & FPGA_MGR_BITSTREM_AUTHENTICATION) { >> + dev_dbg(dev, "Requesting bitstream authentication.\n"); >> + ctype.flags |= FPGA_MGR_BITSTREM_AUTHENTICATION; > Do you want to change this to BIT(COMMAND_AUTHENTICATE_BITSTREAM) or > something like that? OK, I will change to BIT(COMMAND_AUTHENTICATE_BITSTREAM). Regards, Richard >> } else { >> dev_dbg(dev, "Requesting full reconfiguration.\n"); >> } >> -- >> 2.7.4 >> > > Thanks, > Moritz >