[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220308111003.257351-1-jarkko@kernel.org>
Date: Tue, 8 Mar 2022 13:10:00 +0200
From: Jarkko Sakkinen <jarkko@...nel.org>
To: linux-mm@...ck.org, linux-fsdevel@...r.kernel.org
Cc: Dave Hansen <dave.hansen@...ux.intel.com>,
Nathaniel McCallum <nathaniel@...fian.com>,
Reinette Chatre <reinette.chatre@...el.com>,
Alexander Viro <viro@...iv.linux.org.uk>,
linux-sgx@...r.kernel.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Jarkko Sakkinen <jarkko@...nel.org>
Subject: [PATCH RFC v2 0/3] MAP_POPULATE for device memory
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 | 9 ++-
6 files changed, 175 insertions(+), 42 deletions(-)
--
2.35.1
Powered by blists - more mailing lists