Received: by 10.223.185.116 with SMTP id b49csp2432883wrg; Thu, 22 Feb 2018 13:44:42 -0800 (PST) X-Google-Smtp-Source: AH8x224jNhQHXkWqnPU0DsyyJLPyIXPPCBXR8VoWtfwapc8Lxe/IHsneiUZyC23AmXec7EYhiy+T X-Received: by 10.101.69.134 with SMTP id o6mr6920540pgq.340.1519335881910; Thu, 22 Feb 2018 13:44:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519335881; cv=none; d=google.com; s=arc-20160816; b=zhjcBlAnJayd2V5b2JPoWr1R44SHfXnPq/4s0jYzsnUl+lyYZtv3s4RVwTPkxaqhLR Uk7SLCbctjnSpLJTcFfYUDBsy1aEAB+IP0igDUZis/gfBpLU3ykgohSr/z8M/yw06+AR JoGRj2oRaNvPXSD9YikL8hBr0030P+5tvHJh08y2aGmj4U2a/AXPnvLn+OkDZKCBox+H 8RxDn/R0hntI0S4Ue89UAusnEwk/2fU19lExGfleo4DkTL57TN4KWZixAHwaBs9diZT2 MsfejN9pcsNzMkp6Z4WYUAezEUKYJFl4MhRTlk/hkz8lpkV7kUfe46pObIm/20/2PTsI +BWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=0peQ6pzgklE5+EqWpxpe+4jh61ED41fhatKxFnbvNfM=; b=qg3a8lQevmnaH6LDDylooNor0bBYVT+VBGO9TdZX8fAns7bnJNUYy3YG8lfTv30BWn N2N9yYtbDxTPoIBFaCZ/TEqmWXroctJOMqTfvtjtriNSbqEnA/sW7116XnoJ5eQNiswA ThfsFIcrqyfPmbxXWU0V/kxfiD9gtGdIi24r3NiVw3wJ8yn46y2syku84IGErq1B4o3F Gtlw/PVTNM5RlsWfd9ndNHW4Tkqhe/nIBBMAKQ6BO7lrZhbASiZxxhqEreGn7vJygLtc 02hKGqccPl0OKmlejWk1OpPrkx5wN+yy5oGmAFp7J3gyFlMhcXfbOrZah7OfBw0wB0Yu wK7w== 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 e90-v6si609178plb.749.2018.02.22.13.44.26; Thu, 22 Feb 2018 13:44:41 -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 S1751457AbeBVVnq (ORCPT + 99 others); Thu, 22 Feb 2018 16:43:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:39710 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751330AbeBVVno (ORCPT ); Thu, 22 Feb 2018 16:43:44 -0500 Received: from mail-ua0-f182.google.com (mail-ua0-f182.google.com [209.85.217.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 32F1D2178D for ; Thu, 22 Feb 2018 21:43:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 32F1D2178D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=atull@kernel.org Received: by mail-ua0-f182.google.com with SMTP id b23so1859011uak.9 for ; Thu, 22 Feb 2018 13:43:44 -0800 (PST) X-Gm-Message-State: APf1xPA9jp7ahNC84GosVWggJeB0mbcdqgmLn3il4Zu5lq7GA3XTchb8 +kSvkq7TS1PZvqRFcI5/taGuX8GnIX27aT0sqYI= X-Received: by 10.159.51.130 with SMTP id p2mr6322599uab.158.1519335823244; Thu, 22 Feb 2018 13:43:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.159.60.79 with HTTP; Thu, 22 Feb 2018 13:43:02 -0800 (PST) In-Reply-To: <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> <20180130074131.GD25976@kroah.com> From: Alan Tull Date: Thu, 22 Feb 2018 15:43:02 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCHv1] Add Intel Stratix10 service layer driver To: Greg KH Cc: Richard Gong , arnd@arndb.de, linux-kernel , Yves Vandervennet Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 1:41 AM, Greg KH wrote: > 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? Hi Greg, I'm reviewing this patchset now. v2 will simplify things down and add better documentation. Only 2 headers (one for the client API and one to define the interface with the out of tree code this talks to). > > 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 :) The v2 patch set will include my FPGA manager driver which is the first client of this service. My driver will use all the API functions exported by this service driver. > > 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? There will be other clients, so there will be other patchsets on top of this. We'll be sure to include new API functions and the client that needs them in the same patch set in the future. Thanks for your feedback, helpful as always! Alan > > thanks, > > greg k-h