Received: by 10.223.176.5 with SMTP id f5csp3974377wra; Mon, 29 Jan 2018 23:42:23 -0800 (PST) X-Google-Smtp-Source: AH8x224lBABk60wN019Q0FQ7J4Bv0PX7RE/1lFsUrfvG9HfN+Bnbwl/XeKqJ5IB2NlfkzeLHeSp8 X-Received: by 2002:a17:902:3f83:: with SMTP id a3-v6mr23794920pld.263.1517298143853; Mon, 29 Jan 2018 23:42:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517298143; cv=none; d=google.com; s=arc-20160816; b=Xi1TyBhjptTb/MnmXrNIR6gY7T7dj73pZx/ktxLNlBV3DAXL5Kse3pAwY2Cbpob9n/ QV0OOxlp9j9hkP+IjHf7tgiYxG7eJyJY4jxfMN9ly+MGFuuA/2dDsKGipfHplFr24MGx c+FrJwbYE1uSW/xD5U4Yud3HU9esX1KHwBKQLfhzb8iDL8wiZMdzLIlmYtFjDEZLWjHl OaTxYSc28OlswBObdb0CqkSbUteGAqSx2ZiUEQdnujrTy157mruuPBTpjkV/R1SNr19Z TNTE76MCSdD0W4lt9lukqXjCnDMlucZYSCtYvXeB81VfX8/zQM9JpjM6y8PcMbc2qOUx G64g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=rCfY6M+TLDPqKlQjKJGwMA/pS8haVXe/Vo6l0vvF/rI=; b=a4uP3lIuLcJRLYt1xuOHkomLwg/jqYkjEtoi9lizBXc1c88fchlHYBKb/Iv8wKhxC5 wPx2UDtg2l554iu1uUzqosVLWL3uHzRLhJT1YOyfUD2wG7jNnvgwAQ3lcDEBwN5lN3vC DVyrVPLrylllfB6ceEV6u3Fcrpbg70mpcQ3/GF7hiLCKSDumqASvclAEhJjlLIcNoXFU K08Wzy//gPvmp4GTGpwm3zGNV9haW5Q4NgiF8gObM5f15ylIzCCM3K5vKKuabgfZYA9h DoLRvouVJfJjC91z/EWxGvYEAN5Qd7c6keN+RobeECGAJT7zAzsPF6fugv8CHQ6xI6G4 hEIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 63si1155381pgg.392.2018.01.29.23.42.09; Mon, 29 Jan 2018 23:42:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751790AbeA3Hlg (ORCPT + 99 others); Tue, 30 Jan 2018 02:41:36 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:33146 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751594AbeA3Hlf (ORCPT ); Tue, 30 Jan 2018 02:41:35 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 87953E91; Tue, 30 Jan 2018 07:41:33 +0000 (UTC) Date: Tue, 30 Jan 2018 08:41:31 +0100 From: Greg KH To: Richard Gong Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, atull@kernel.org Subject: Re: [PATCHv1] Add Intel Stratix10 service layer driver Message-ID: <20180130074131.GD25976@kroah.com> References: <1516898344-20020-1-git-send-email-richard.gong@linux.intel.com> <20180125165352.GA21640@kroah.com> <7e01745c-24aa-62f7-0be9-f74f19d6d880@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7e01745c-24aa-62f7-0be9-f74f19d6d880@linux.intel.com> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 29, 2018 at 08:08:11PM -0600, Richard Gong wrote: > Hi Greg, > > Many thanks for your reviews. > > > On 01/25/2018 10:53 AM, Greg KH wrote: > > On Thu, Jan 25, 2018 at 10:39:03AM -0600, richard.gong@linux.intel.com wrote: > > > From: Richard Gong > > > > > > Intel Stratix10 SoC is composed of a 64 bit quad-core ARM Cortex A53 hard > > > processor system (HPS) and Secure Device Manager (SDM). SDM is the hardware > > > which does the FPGA configuration, QSPI, Crypto and warm reset. > > > > > > When the FPGA is configured from HPS, there needs to be a way for HPS to > > > notify SDM the location and size of the configuration data. Then SDM will > > > get the configuration data from that location and perform the FPGA configuration. > > > > > > To meet the whole system security needs and support virtual machine > > > requesting communication with SDM, only the secure world of software (EL3, > > > Exception Level 3) can interface with SDM. All software entities running > > > on other exception levels must channel through the EL3 software whenever it > > > needs service from SDM. > > > > > > Intel Stratix10 service layer driver is added to provide the service for > > > FPGA configuration. Running at privileged exception level (EL1, Exception > > > Level 1), Intel Stratix10 service layer driver interfaces with the service > > > provider at EL1 (Intel Stratix10 FPGA Manager) and manages secure monitor > > > call (SMC) to communicate with secure monitor software at secure monitor > > > exception level (EL3). > > > > > > Later the Intel Stratix10 service layer driver will be extended to provide > > > services for QSPI, Crypto and warm reset. > > > > > > Richard Gong (1): > > > driver: misc: add Intel Stratix10 service layer driver > > > > > > drivers/misc/Kconfig | 3 +- > > > drivers/misc/Makefile | 3 +- > > > drivers/misc/intel-service/Kconfig | 9 + > > > drivers/misc/intel-service/Makefile | 2 + > > > drivers/misc/intel-service/intel_service.c | 703 +++++++++++++++++++++++++++++ > > > include/linux/intel-service-client.h | 227 ++++++++++ > > > include/linux/intel-service.h | 122 +++++ > > > include/linux/intel-smc.h | 246 ++++++++++ > > Simple questions first: > > - why do you have 3 different .h files for a single .c file? > This is because service layer driver interface with both the service > provider and secure monitor SW. > intel-service-client.h is created to define interface between service > providers (FPGA manager is one of them) and service layer. Alan Tull's FPGA > manager .c file includes this header file > intel-smc.h defines the secure monitor call (SMC) message protocols used for > service layer driver in normal world (EL1) to communicate with secure > monitor SW in secure monitor exception level 3 (EL3). Also this header file > is shared with firmware since both (FW, service layer) utilizes the same SMC > message protocol. > intel-sevice.h is created to define service layer's own data structures > (service controller, channel for communicating with service provider, shared > memory region, private data etc) That's very complex for a single patch submission, don't you think? Please do not add new apis / interfaces for code that is not part of your patch series, otherwise we don't know what the future is going to hold :) This feels like it should be a series of patches, to properly explain this and hook up all of the new interfaces you are adding, right? thanks, greg k-h