Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp4666895img; Tue, 26 Mar 2019 14:12:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4PD7eZB+6cdf04OxMKDgFuF70EK4t/HfRlMujKgYIUpg0Waj8hSCYEOMZsZqFcva/QdsI X-Received: by 2002:a17:902:361:: with SMTP id 88mr33716150pld.78.1553634735499; Tue, 26 Mar 2019 14:12:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553634735; cv=none; d=google.com; s=arc-20160816; b=dlaF1KSpPV1m9Jjvi7IIul+M8pXbrwbGQSXbwGYWnPbZ8Qbf9eolbMGTy8eVBebR+L quyt2alNc87xwQup679am5TZNBZgaSPuihX6tKaSuu+jxd4Rf0g/k3UlCu5K5KM58scL dWPZ1fgRlGwThSiQr0dP34zppEDPUvqXTZr+vzSD3+0r9jPF9oGKYInUJLaxzdjb5clS ZWHmxr7+2wkql4VqY09VP/R/ariwRA9fDJ4//aL2L31daFda2x0tGBgiOFsH1uRRc22C EClzbA4ImBcrfIbo4AKUffqozt1NNrhgtXo72ieDAipbGRuKHe9nV86zlAj47AXcfRCk chRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :dlp-reaction:dlp-version:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=+uvfQ6YddA9fyEhNQoltAx+6E2pv0N8Xr3CxJh8Zg8w=; b=xZ2AcMOxB/amGF9+Jg9lSkDplhZoj2bUvKXZrBRj6V7togys0t0to35mjPaZ4BpKX0 mp94zU2CQPbEPbVnB0hI+1rRtTEz/BFcM3xmR3Snlromi9/16WK5Ho1GrJI5PQmg/1St U4h7mPozfj3hHvw6ry6HUXxh6QoTDOOfYgfF9PH1mOZvlEB27MlfvODRWiYkMCrkPdJC mMxma3qCf6wZhlInTrNXp8X62ZtWqnYYNrBt6rR5GeilHug3AqH6kpzrD+DUD/fMJ0Dn CpwG/ct4vjVBjLc7V3E3A7iFdOojbhXB5o06GqalE7ckS+KU6cdds1W29qj4T/NHzveI AS5w== 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 r3si16518144pgp.154.2019.03.26.14.12.00; Tue, 26 Mar 2019 14:12:15 -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 S1732369AbfCZVLU convert rfc822-to-8bit (ORCPT + 99 others); Tue, 26 Mar 2019 17:11:20 -0400 Received: from mga17.intel.com ([192.55.52.151]:57921 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732118AbfCZVLU (ORCPT ); Tue, 26 Mar 2019 17:11:20 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2019 14:11:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,274,1549958400"; d="scan'208";a="158640313" Received: from pgsmsx103.gar.corp.intel.com ([10.221.44.82]) by fmsmga001.fm.intel.com with ESMTP; 26 Mar 2019 14:11:16 -0700 Received: from pgsmsx112.gar.corp.intel.com ([169.254.3.114]) by PGSMSX103.gar.corp.intel.com ([169.254.2.210]) with mapi id 14.03.0415.000; Wed, 27 Mar 2019 05:11:15 +0800 From: "Huang, Kai" To: "Christopherson, Sean J" , "Thomas Gleixner" CC: "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 Thread-Topic: [PATCH v19,RESEND 16/27] x86/sgx: Add the Linux SGX Enclave Driver Thread-Index: AQHU3zlqJyshVndaUUiNLGXmU0HMwKYdUroAgAALCICAACVqAIAA7wlA Date: Tue, 26 Mar 2019 21:11:14 +0000 Message-ID: <105F7BF4D0229846AF094488D65A0989356F2FAD@PGSMSX112.gar.corp.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> <20190326145452.GD3757@linux.intel.com> In-Reply-To: <20190326145452.GD3757@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWE2YTA2ZTUtNGNlZi00ZThmLWI1ODMtNGMxN2E0MjRmMWYyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiM1wvS3REMlV5TkZvNnZqUWhLb2RXUzRTV2Q4OXNPN05qb1wvT2R6OE1xN3p1TzFka0pzRkwxVDdscndyeFh1eW1GIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 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. Sure. Thanks. Thanks, -Kai