All of
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <>
Cc: Dave Hansen <>,
	Nathaniel McCallum <>,
	Reinette Chatre <>,
	Alexander Viro <>,,,
	Andrew Morton <>,
	Jarkko Sakkinen <>
Subject: [PATCH RFC v3 0/3] MAP_POPULATE for device memory
Date: Tue,  8 Mar 2022 13:28:30 +0200	[thread overview]
Message-ID: <> (raw)

SGX is weird.  SGX memory is managed outside the core mm.  It doesn't
have a 'struct page' and get_user_pages() doesn't work on it.  Its VMAs
are marked with VM_IO.  So, none of the existing methods for avoiding
page faults work on SGX memory.

This patch set essentially helps extend existing "normal RAM" kernel
ABIs to work for avoiding faults for SGX too.  SGX users want to enjoy
all of the benefits of a delayed allocation policy (better resource use,
overcommit, NUMA affinity) but without the cost of millions of faults.

Jarkko Sakkinen (3):
  mm: Add f_op->populate() for populating memory outside of core mm
  x86/sgx: Export sgx_encl_page_alloc()
  x86/sgx: Implement EAUG population with MAP_POPULATE

 arch/x86/kernel/cpu/sgx/driver.c | 128 +++++++++++++++++++++++++++++++
 arch/x86/kernel/cpu/sgx/encl.c   |  38 +++++++++
 arch/x86/kernel/cpu/sgx/encl.h   |   3 +
 arch/x86/kernel/cpu/sgx/ioctl.c  |  38 ---------
 include/linux/fs.h               |   1 +
 mm/gup.c                         |  11 ++-
 6 files changed, 178 insertions(+), 41 deletions(-)


             reply	other threads:[~2022-03-08 11:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08 11:28 Jarkko Sakkinen [this message]
2022-03-08 11:28 ` [PATCH RFC v3 1/3] mm: Add f_op->populate() for populating memory outside of core mm Jarkko Sakkinen
2022-03-08 11:28 ` [PATCH RFC v3 2/3] x86/sgx: Export sgx_encl_page_alloc() Jarkko Sakkinen
2022-03-08 11:28 ` [PATCH RFC v3 3/3] x86/sgx: Implement EAUG population with MAP_POPULATE Jarkko Sakkinen
2022-03-08 11:41   ` 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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \

* 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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.