Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp2622405pxb; Sun, 15 Nov 2020 11:25:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxl3f1odzIQqIwNxNfQWX/iHNibMlkYGaGf1EODigHnids+ZSEpZVXkxDS4ZjwIHfr/I0Ah X-Received: by 2002:a17:906:4c84:: with SMTP id q4mr11373159eju.322.1605468328605; Sun, 15 Nov 2020 11:25:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605468328; cv=none; d=google.com; s=arc-20160816; b=nwG99XZUqLWBfamUZeSdHisn2BTKXAG+A83snNh5AS8pvoU027l9uk23QwehTfb/WU HQ7vgRi8o90fVZo77F9foqPPnEBoi5IKzDv3VIXb+huxCL9+WGm7B8N7M9C213yEO1qK 4zDgtg1IWWV+yVBzJK78n758YA6X600WavQx/Ofrxq36qfAarV31mTPLwu5iov7HhfLM i8GpREfKeAKfYBzD4mNMXFuVYC2ij3x7VhgNigqQk+KvCYtzxoDFvo6KkoLt8quuCmlX tu7BpTO5fJ2lqNLtRJhMrzWhmPI0RQALqzOkrSCHFN/NAeUnM29DwsZY594NZkJuTDrk QUfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=sCdUZDZ+Yqlofwx7LvAQagcvHYFaJ7VL6GaQVJUCgmw=; b=N09687XZyIBit76X18OUBqp48Qeigdnj6RZhYjqnOR7JZJahTLKZDbX3LZs9SoOl9w V6Di6yrrJcRD7JkBEXyUwA6M6rhNxCnS2bDic1Go3KtrqsBQs7zG64u66KUjcrlNgL7W Ungb4sve3Qum0y/UkGEpKHMgsygWLXcsCTfafB6rufQdOo/zgn/9u2odQgLKazNAb0wF 8/i5W2oz33DlRwaNT9n/qCiKDvh/usuMo/y2g92Qmy5BsC1xFF67NJNCbMxXuQfbts3y Y9yHi5+O2bSShdrOYviigfwZ6dWKzhnm/o33v4zv6Yz4lhaBxfAgQ+dsE0zAIlUROXZH xgJw== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si10270737edu.277.2020.11.15.11.24.51; Sun, 15 Nov 2020 11:25:28 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727654AbgKOTTk (ORCPT + 99 others); Sun, 15 Nov 2020 14:19:40 -0500 Received: from mail-pf1-f175.google.com ([209.85.210.175]:40306 "EHLO mail-pf1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726823AbgKOTTk (ORCPT ); Sun, 15 Nov 2020 14:19:40 -0500 Received: by mail-pf1-f175.google.com with SMTP id w14so11325767pfd.7; Sun, 15 Nov 2020 11:19:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=sCdUZDZ+Yqlofwx7LvAQagcvHYFaJ7VL6GaQVJUCgmw=; b=fh2pi5HURLkEPREU6WUpQ/yUTONclVFefEQbpt7y1aMt5qTj5FD206dB4onohFgneu SwCXUFfWYFnZscFeb+ZquZKOO+X02sckVQHzIKWm/6kXcVqKZ3AjBGe1ylAXtjsQEUS3 SbI0NUYYrbX/LdOLK69LUpXPZCAQ9jeTAecY8IYBhCDmJUnMzZ026wAGHyD+sZT64bIL xEx/Z2rvSYmzSLILg6M8i8nKeqduwhrkN8evyvG5T191MnbGIhE8GHuiezyDsv1Z4T6u 5Ypqj+IPSsGkqKxWgM8VF2U8sEFsZnzI/EpD6ypddbLbKQXs+WXxuYt5dmcgPSQF9TDl CUxw== X-Gm-Message-State: AOAM533uFdQNmemmuQ2PKrtL1yyvbfvZs9zF7q40jJ1fFIdJHbxUfKUk 0n+l28hUYXsD+IrohvbAnt0= X-Received: by 2002:a62:7781:0:b029:18b:5c31:5c27 with SMTP id s123-20020a6277810000b029018b5c315c27mr11028704pfc.70.1605467978279; Sun, 15 Nov 2020 11:19:38 -0800 (PST) Received: from localhost ([2601:647:5b00:1161:a4cc:eef9:fbc0:2781]) by smtp.gmail.com with ESMTPSA id e184sm16038199pfe.146.2020.11.15.11.19.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Nov 2020 11:19:37 -0800 (PST) Date: Sun, 15 Nov 2020 11:19:36 -0800 From: Moritz Fischer To: richard.gong@linux.intel.com Cc: mdf@kernel.org, trix@redhat.com, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, dinguyen@kernel.org, sridhar.rajagopal@intel.com, Richard Gong Subject: Re: [PATCHv1 4/4] fpga: stratix10-soc: entend driver for bitstream authentication Message-ID: <20201115191936.GA283592@epycbox.lan> References: <1605204403-6663-1-git-send-email-richard.gong@linux.intel.com> <1605204403-6663-5-git-send-email-richard.gong@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1605204403-6663-5-git-send-email-richard.gong@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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? Wasn't the point of using the BIT() to not assume alignment of FPGA_MGR flags and firmware structure? 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). > + } 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? > } else { > dev_dbg(dev, "Requesting full reconfiguration.\n"); > } > -- > 2.7.4 > Thanks, Moritz