From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28A40C43381 for ; Tue, 26 Mar 2019 14:54:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F24742075C for ; Tue, 26 Mar 2019 14:54:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731825AbfCZOyy (ORCPT ); Tue, 26 Mar 2019 10:54:54 -0400 Received: from mga03.intel.com ([134.134.136.65]:13451 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726111AbfCZOyy (ORCPT ); Tue, 26 Mar 2019 10:54:54 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2019 07:54:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,271,1549958400"; d="scan'208";a="310547256" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.181]) by orsmga005.jf.intel.com with ESMTP; 26 Mar 2019 07:54:52 -0700 Date: Tue, 26 Mar 2019 07:54:52 -0700 From: Sean Christopherson To: Thomas Gleixner Cc: "Huang, Kai" , "jarkko.sakkinen@linux.intel.com" , "linux-kernel@vger.kernel.org" , "linux-sgx@vger.kernel.org" , "x86@kernel.org" , "Svahn, Kai" , "nhorman@redhat.com" , "josh@joshtriplett.org" , "suresh.b.siddha@intel.com" , "Ayoun, Serge" , "Huang, Haitao" , "akpm@linux-foundation.org" , "npmccallum@redhat.com" , "rientjes@google.com" , "luto@kernel.org" , "Katz-zamir, Shay" , "Hansen, Dave" , "bp@alien8.de" , "andriy.shevchenko@linux.intel.com" Subject: Re: [PATCH v19,RESEND 16/27] x86/sgx: Add the Linux SGX Enclave Driver Message-ID: <20190326145452.GD3757@linux.intel.com> References: <20190320162119.4469-1-jarkko.sakkinen@linux.intel.com> <20190320162119.4469-17-jarkko.sakkinen@linux.intel.com> <1553601688.17255.12.camel@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 26, 2019 at 01:40:57PM +0100, Thomas Gleixner wrote: > On Tue, 26 Mar 2019, Huang, Kai wrote: > > On Wed, 2019-03-20 at 18:21 +0200, Jarkko Sakkinen wrote: > > > 13 files changed, 1657 insertions(+), 2 deletions(-) > > > create mode 100644 arch/x86/include/uapi/asm/sgx.h > > > create mode 100644 arch/x86/kernel/cpu/sgx/driver/Makefile > > > create mode 100644 arch/x86/kernel/cpu/sgx/driver/driver.h > > > create mode 100644 arch/x86/kernel/cpu/sgx/driver/ioctl.c > > > create mode 100644 arch/x86/kernel/cpu/sgx/driver/main.c > > > create mode 100644 arch/x86/kernel/cpu/sgx/encl.c > > > create mode 100644 arch/x86/kernel/cpu/sgx/encl.h > > > > Shouldn't the driver be located somewhere under drivers/, but not under arch/x86? > > > > I don't think x86 maintainers should have the burden to review every code > > change made to SGX driver? > > I rather prefer to have it in x86. Why? Because driver code has a tendency > to get under the radar. And having everything under arch/x86 will likely reduce the maintenance burden for everyone: - Doesn't require taking changes through multiple trees or coordinating acks from multiple maintainers. - Significantly reduces the number of functions, macros, structs and variables that needs to be exposed in asm/sgx.h (actually eliminates it entirely at this point) which allows for sane code organization as opposed to dumping everything in one big header. - Mostly avoids bikeshedding over whether something is architectural or belongs in the so called driver.