Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4009492yba; Mon, 29 Apr 2019 12:10:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqAgw09t4U/XISeqZP5FEtzp5zDHzAarSNrlz5RmQwvJLWXjxlXI22ukqzh5y3NMGP7h+G X-Received: by 2002:a63:7d0a:: with SMTP id y10mr60386749pgc.292.1556565007002; Mon, 29 Apr 2019 12:10:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556565006; cv=none; d=google.com; s=arc-20160816; b=vZ2qtuRyu8GDhOn6ZWbJMdfrfUqIzzuiOJI4dVU1wzIyd5eXerX5Q360IfrmKAyszq WVschreX9f/+YgzYtIiB2RU0IAzlr7diEcszG9wYs1Fo3lIxtnWVO1A12u/nklnrGhqL kUH7HIrwrLKIpEIuubc/EmCB64WPhldX1XOOffhmqF6nxbA0yRfvw0L3gN+hsg2tJi6b RyQMabLTPUKH4idbNRjLQxlKU/paGPj7GMenx+vpLfuleWPS5eEi8Jc8P/Py8V77c968 C7hMOWtruAq9l3YeKp2uKIIXh29OeNLL1jW+sqgZgStGWCI4CETMsXYIp0ijd/sCsCkA TJjg== 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=IjlkFKrrBCZo2i5j6s0kmfGGaVqXba1plIoPmL48jPI=; b=jvKhucbw9ODEBw84AVMi7cd2ape+ARgRgWTnsf/6I4kyjXWChObrZ3bR6jYAie4RmE qQUYCfwaxCs8sacNarrd7gv6sIHh9Jyd3sSfSYoqXtzRkwFk1FabySJXHdzPwpaULXD3 /IcX0TKyB6UC3RgtMiyuDOoQOorF9jalz0dzl8OrowT0MWBaEhzTTZGnyP8SBriu+AmG HUly6s+dUduVTYHndy8PpvAqbmq8GYLyQcj255RJxrU1lFqtWwNQ7uSxeRu29yTPcGFW kda/J7hSMBO9gM8FnUhX/eKPUGkq3j8u4Wn2rrJBT6pxY+jKw7RPIJTQLDRa5qT3szux BCuw== 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 a18si14379350pfi.230.2019.04.29.12.09.49; Mon, 29 Apr 2019 12:10:06 -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 S1729126AbfD2TI6 (ORCPT + 99 others); Mon, 29 Apr 2019 15:08:58 -0400 Received: from mga01.intel.com ([192.55.52.88]:16938 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726725AbfD2TI6 (ORCPT ); Mon, 29 Apr 2019 15:08:58 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Apr 2019 12:08:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,410,1549958400"; d="scan'208";a="139872081" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.181]) by orsmga006.jf.intel.com with ESMTP; 29 Apr 2019 12:08:57 -0700 Date: Mon, 29 Apr 2019 12:08:57 -0700 From: Sean Christopherson To: Jethro Beekman Cc: Jarkko Sakkinen , "linux-kernel@vger.kernel.org" , "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 v20 15/28] x86/sgx: Add the Linux SGX Enclave Driver Message-ID: <20190429190857.GD31379@linux.intel.com> References: <20190417103938.7762-1-jarkko.sakkinen@linux.intel.com> <20190417103938.7762-16-jarkko.sakkinen@linux.intel.com> <20190422215831.GL1236@linux.intel.com> <6dd981a7-0e38-1273-45c1-b2c0d8bf6fed@fortanix.com> <20190424002653.GB14422@linux.intel.com> <77cface6-dcc4-7e26-9910-ea9d13152531@fortanix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77cface6-dcc4-7e26-9910-ea9d13152531@fortanix.com> 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 Wed, Apr 24, 2019 at 01:04:21AM +0000, Jethro Beekman wrote: > On 2019-04-23 17:26, Sean Christopherson wrote: > >On Tue, Apr 23, 2019 at 11:29:24PM +0000, Jethro Beekman wrote: > >>On 2019-04-22 14:58, Sean Christopherson wrote: > >>>Now that the core SGX code is approaching stability, I'd like to start > >>>sending RFCs for the EPC virtualization and KVM bits to hash out that side > >>>of things. The ACPI crud is the last chunk of code that would require > >>>non-trivial changes to the core SGX code for the proposed virtualization > >>>implementation. I'd strongly prefer to get it out of the way before > >>>sending the KVM RFCs. > >> > >>What kind of changes? Wouldn't KVM just be another consumer of the same API > >>used by the driver? > > > >Nope, userspace "only" needs to be able to mmap() arbitrary chunks of EPC. > > I don't think this is sufficient. Don't you need enclave tracking in order > to support paging? The plan is to not support graceful EPC reclaim in the host on platforms without VMM oversubscription extensions, e.g. ENCLV, ERDINFO, etc..., due to the complexity and performance overhead. Mostly the complexity. And if reclaim were to be supported without the extensions, it would be done without exiting to userspace on every ENCLS instruction.