linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Pavel Machek <pavel@ucw.cz>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	x86@kernel.org, platform-driver-x86@vger.kernel.org,
	nhorman@redhat.com, npmccallum@redhat.com,
	Alexei Starovoitov <ast@kernel.org>,
	Andi Kleen <ak@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andy Lutomirski <luto@kernel.org>, Borislav Petkov <bp@suse.de>,
	"David S. Miller" <davem@davemloft.net>,
	David Woodhouse <dwmw@amazon.co.uk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@kernel.org>,
	"open list:INTEL SGX" <intel-sgx-kernel-dev@lists.01.org>,
	Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Konrad
Subject: Re: [PATCH v11 00/13] Intel SGX1 support
Date: Tue, 11 Dec 2018 10:31:01 -0800	[thread overview]
Message-ID: <20181211183101.GE14731@linux.intel.com> (raw)
In-Reply-To: <12301623-0a63-10ac-1d5e-828569a953e5@intel.com>

On Tue, Dec 11, 2018 at 10:10:38AM -0800, Dave Hansen wrote:
> On 12/10/18 3:12 PM, Josh Triplett wrote:
> >> Or maybe even python/shell scripts? It looked to me like virtual
> >> memory will be "interesting" for enclaves.
> > Memory management doesn't seem that hard to deal with.
> 
> The problems are:
> 
> 1. SGX enclave memory (EPC) is statically allocated at boot and can't
>    grow or shrink
> 2. EPC is much smaller than regular RAM
> 3. The core VM has no comprehension of EPC use, thus can not help
>    with its algorithms, like the LRU
> 4. The SGX driver implements its own VM which is substantially simpler
>    than the core VM, but less feature-rich, fast, or scalable

I'd also add:

  5. Swapping EPC pages can only be done through SGX specific ISA that
     has strict concurrency requirements and enforces TLB flushing.
  6. There are specialized types of EPC pages that have different
     swapping requirements than regular EPC pages.
  7. EPC pages that are exposed to a KVM guest have yet another set of
     swapping requirements.

In other words, extending the core VM to SGX EPC is painfully difficult.

  reply	other threads:[~2018-12-11 18:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 17:09 [PATCH v11 00/13] Intel SGX1 support Jarkko Sakkinen
2018-06-08 17:09 ` [PATCH v11 01/13] compiler.h, kasan: add __SANITIZE_ADDRESS__ check for __no_kasan_or_inline Jarkko Sakkinen
2018-06-12 10:50 ` [PATCH v11 00/13] Intel SGX1 support Pavel Machek
2018-06-19 14:59   ` Jarkko Sakkinen
2018-06-19 20:04     ` Pavel Machek
2018-06-19 20:23       ` Peter Zijlstra
2018-06-19 21:48       ` Josh Triplett
2018-12-09 20:06         ` Pavel Machek
2018-12-10  7:47           ` Josh Triplett
2018-12-10  8:27             ` Pavel Machek
2018-12-10 23:12               ` Josh Triplett
2018-12-11 18:10                 ` Dave Hansen
2018-12-11 18:31                   ` Sean Christopherson [this message]
2018-06-19 20:36     ` Peter Zijlstra
2018-06-21 12:55 ` Ingo Molnar
2018-06-25  9:44   ` Jarkko Sakkinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181211183101.GE14731@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=Janakarajan.Natarajan@amd.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=ast@kernel.org \
    --cc=bp@suse.de \
    --cc=dave.hansen@intel.com \
    --cc=davem@davemloft.net \
    --cc=dwmw@amazon.co.uk \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=intel-sgx-kernel-dev@lists.01.org \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=josh@joshtriplett.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=nhorman@redhat.com \
    --cc=npmccallum@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).