Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4357174img; Tue, 26 Mar 2019 07:55:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoI1qgUnviG4nWtqphASBMJJvdAa5aO3K+x8RFy9JJPjvpA80iJUve1Ug7BmZB0rjW4Rr2 X-Received: by 2002:a63:c10b:: with SMTP id w11mr29617122pgf.39.1553612156802; Tue, 26 Mar 2019 07:55:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553612156; cv=none; d=google.com; s=arc-20160816; b=D3s5rzxT7w2gsxmisvyBUTISpXFM7SHo15I7/z60OEd3Tdmh4PkoPA/VFDqbNiJfsW yrT8BVtywaK/CidEDG8+Kko4V9PxadAO2K6JRDZfxRsx71QI1JgRciDjbnUYqlf5cEz4 Fsl6CFEc9t5hA3GhLZvpVws5WZHHkSiuVP53H0sIQetysKX7jB/uBLLQgVhKG3+dzZ2q 1rG5Rj+yw8cMby3jYY5fCJ5kaVVJ4J58Sso5ju/zerakJuyQfEjJ70CsjZUuk61K34zF IaStFHGyB9KJ8J3MVodwSNf/YBzPZGEMgIR9x/5csMJeZVBGHABKWSXvzqvkl1smqKMT /KzQ== 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; bh=bAv6VBN4F0FDdigQZa2R4faHvUjtf/4zeZrj8IjPpgY=; b=yd0Pykib+G380m4DjqpehKDeLancNtrgGMurQ4ERQFQxWK23tA9v3MDZHEDit9KPc6 1vU70bc8MpTzug4ekn25v2mdFBiyXSb5ieCNI2ZhOHg9G52MMuyyvwSk+rEGLxj7RKKD j2ViJA0WZwq14QFF6yR0ADdKrnVVV1E0aTwTxXGHNN/soAK6AalOW6BAzEXh4n9QyLuV KAZtVkP29h1b3+rehQB7ZRhQeZRCHCEM9qqOGEioaPckTWAh5F8lU8TEDLOTF3KljAfW YKJ/q2TmJ2Y5HD0j4SCjlvGzbqFqqls53h7lOwfM876IM+wiUII3NHYM0C6IvU5Cnuue FGxg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r12si13876939pgr.125.2019.03.26.07.55.41; Tue, 26 Mar 2019 07:55:56 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731806AbfCZOyy (ORCPT + 99 others); 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.