Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2526169imu; Sun, 23 Dec 2018 01:37:57 -0800 (PST) X-Google-Smtp-Source: ALg8bN6DOS5h6D+/GjGsEbxx7IZQZg4lLMUXjMrIhDwAzdCVsUe/XS7zr6KGNZrN2rk3DfIZfcIE X-Received: by 2002:a17:902:24e7:: with SMTP id l36mr9130713plg.61.1545557877359; Sun, 23 Dec 2018 01:37:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545557877; cv=none; d=google.com; s=arc-20160816; b=mMwKGMj3qY5FRk8Ex9xqQnWkOP7Y7NuuwzxVF5BcXsr16KNik6NQn/431CzjpcvDaX BnBj8AWwsZOlTzFYufDL9OYsxBJJVtYt/QFRtmQJcSpYqd56+QIvkqm5SVu+U+pLK7BC jwyaLhOW69g8gVY3AxR/mJSy8axmvkRjIcOga9c99ic0u58By4gCaB8BlADv1MEfBh8Y wbzWnnfi+hWzuB8AW4D7qC1gE3jb3lLuCWL3UxEcOvXay7HbkFHxNDA5LmAOU1J7dNqS IhHKAq0MINGOybjpGBpGa8RiNegHOsc2XhN+RePnBbWFX1oQeDLUuu2jvQnJixj51PU7 Ba6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=NjUtm8XHSBuCe2cPxh5QEvI5S64T+/KByJrUVS0LHYg=; b=YGOhSerEpvR1+a8EGDDtVCjO8z+EBD5YusIIShcShAQXMChUfZ0LHakMchLjFQ8tc3 j4YKFVpKulewlYuD+10cSKUieoiTrTzBiUFcXoCnBxXTqCcOWFns+kOPwm6pLN/vIuF4 56m4lTytobxFdt7TX/v9ZlB4kdieplvNdaEdQ3dgZ6bLNivBiJnLED+bgeHiDnQpQyVl s2kd5EU2JvdvfHr3OU/GYdFfwMIXgp3y0c9hqmjrZfm+LeCrvjZrAVLTpCTCvUBOx4pu 0GOgKRAHDCczrbiSVG9+lwq439NuCUgkNKseWsV6Y51ELQ3QEuNVMmhlk/wdl40U724+ 1hLA== 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 c1si6947890pld.194.2018.12.23.01.37.41; Sun, 23 Dec 2018 01:37:57 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392270AbeLUXiB (ORCPT + 99 others); Fri, 21 Dec 2018 18:38:01 -0500 Received: from mga17.intel.com ([192.55.52.151]:19454 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729062AbeLUXiA (ORCPT ); Fri, 21 Dec 2018 18:38:00 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2018 15:38:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,383,1539673200"; d="scan'208";a="112502964" Received: from ncanderx-mobl.ger.corp.intel.com (HELO localhost) ([10.249.254.238]) by orsmga003.jf.intel.com with ESMTP; 21 Dec 2018 15:37:52 -0800 Date: Sat, 22 Dec 2018 01:37:51 +0200 From: Jarkko Sakkinen To: Andy Lutomirski Cc: Sean Christopherson , Jethro Beekman , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "x86@kernel.org" , Dave Hansen , Peter Zijlstra , "H. Peter Anvin" , "linux-kernel@vger.kernel.org" , "linux-sgx@vger.kernel.org" , Josh Triplett , Haitao Huang , "Dr . Greg Wettstein" Subject: Re: x86/sgx: uapi change proposal Message-ID: <20181221233751.GA8160@linux.intel.com> References: <20181214215729.4221-1-sean.j.christopherson@intel.com> <7706b2aa71312e1f0009958bcab24e1e9d8d1237.camel@linux.intel.com> <598cd050-f0b5-d18c-96a0-915f02525e3e@fortanix.com> <20181219091148.GA5121@linux.intel.com> <613c6814-4e71-38e5-444a-545f0e286df8@fortanix.com> <20181219144515.GA30909@linux.intel.com> <20181221162825.GB26865@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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 21, 2018 at 09:12:46AM -0800, Andy Lutomirski wrote: > Hmm. I guess this makes some sense. My instinct would be to do it a > little differently and have: > > /dev/sgx/enclave: Each instance is an enclave. > > /dev/sgx/epc: Used to get raw EPC for KVM. Might have different > permissions, perhaps 0660 and group kvm. > > /dev/sgx/something_else: For when SGX v3 adds something else :) If I make a draw by saying that I will go with the "ioctls for enclave fd" as I'm already making good progress in implementation for v19 and we will look at it? Does not look like a fruitful conversation to continue forward without functional code. I will also update my selftest (as it is part of the patch set) to align with whatever we have so you can immediately run something. And since no one is giving me anything at all on swapping but instead cutting hairs on here, I will lock in (at least for v19) to use shmem again. Sounds like a plan? All the internals will work for whatever mess we want to introduce to the uapi. /Jarkko