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=ham 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 018FAC43381 for ; Thu, 21 Mar 2019 16:20:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CDDC9218E2 for ; Thu, 21 Mar 2019 16:20:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728093AbfCUQUu (ORCPT ); Thu, 21 Mar 2019 12:20:50 -0400 Received: from mga02.intel.com ([134.134.136.20]:52939 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727829AbfCUQUt (ORCPT ); Thu, 21 Mar 2019 12:20:49 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2019 09:20:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,253,1549958400"; d="scan'208";a="216266068" Received: from dilu-mobl2.ccr.corp.intel.com (HELO localhost) ([10.249.254.184]) by orsmga001.jf.intel.com with ESMTP; 21 Mar 2019 09:20:39 -0700 Date: Thu, 21 Mar 2019 18:20:38 +0200 From: Jarkko Sakkinen To: Jethro Beekman Cc: Sean Christopherson , "x86@kernel.org" , "linux-sgx@vger.kernel.org" , "akpm@linux-foundation.org" , "dave.hansen@intel.com" , "nhorman@redhat.com" , "npmccallum@redhat.com" , "serge.ayoun@intel.com" , "shay.katz-zamir@intel.com" , "haitao.huang@intel.com" , "andriy.shevchenko@linux.intel.com" , "tglx@linutronix.de" , "kai.svahn@intel.com" , "bp@alien8.de" , "josh@joshtriplett.org" , "luto@kernel.org" , "kai.huang@intel.com" , "rientjes@google.com" Subject: Re: [PATCH v19 00/27] Intel SGX1 support Message-ID: <20190321162038.GU4603@linux.intel.com> References: <20190317211456.13927-1-jarkko.sakkinen@linux.intel.com> <20190319234103.GM25575@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-sgx-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sgx@vger.kernel.org On Tue, Mar 19, 2019 at 11:52:32PM +0000, Jethro Beekman wrote: > > And IMO encl.{c,h} belongs in the "driver" code, but to let the driver be > > loadable it got shoved into the core subsystem. All of that code is > > specific to running enclaves in the host, i.e. it shouldn't exist if I > > compile out the driver entirely (in a future world where I want the core > > SGX subsystem for virtualization purposes). > > Your argument here is "something that belongs in the driver isn't, therefore > we shouldn't have a loadable driver". This seems backwards to me. Instead, > we should see what interface would be needed so that this stuff *can* be in > the driver. Yes, all the code that needs to be in there to deal with enclaves is already there in v19. Only the ioctl's live in the driver. The way I see it the driver part was wrong before and now the split is way than before. /Jarkko