All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] MAP_POPULATE for device memory
@ 2022-03-06  5:32 ` Jarkko Sakkinen
  0 siblings, 0 replies; 68+ messages in thread
From: Jarkko Sakkinen @ 2022-03-06  5:32 UTC (permalink / raw)
  To: linux-mm
  Cc: Dave Hansen, Nathaniel McCallum, Reinette Chatre, Andrew Morton,
	linux-sgx, linux-kernel, Jarkko Sakkinen, Florian Fainelli,
	Thomas Bogendoerfer, Matthew Auld, Thomas Hellström,
	Daniel Vetter, Jason Ekstrand, Chris Wilson, Maarten Lankhorst,
	Greg Kroah-Hartman, Tvrtko Ursulin, Vasily Averin, Shakeel Butt,
	Michal Hocko, zhangyiru, Alexey Gladkov, Alexander Mikhalitsyn,
	linux-mips, intel-gfx, dri-devel, codalist, linux-unionfs,
	linux-fsdevel

For device memory (aka VM_IO | VM_PFNMAP) MAP_POPULATE does nothing. Allow
to use that for initializing the device memory by providing a new callback
f_ops->populate() for the purpose.

SGX patches are provided to show the callback in context.

An obvious alternative is a ioctl but it is less elegant and requires
two syscalls (mmap + ioctl) per memory range, instead of just one
(mmap).

Jarkko Sakkinen (3):
  mm: Add f_ops->populate()
  x86/sgx: Export sgx_encl_page_alloc()
  x86/sgx: Implement EAUG population with MAP_POPULATE

 arch/mips/kernel/vdso.c                    |   2 +-
 arch/x86/kernel/cpu/sgx/driver.c           | 129 +++++++++++++++++++++
 arch/x86/kernel/cpu/sgx/encl.c             |  38 ++++++
 arch/x86/kernel/cpu/sgx/encl.h             |   3 +
 arch/x86/kernel/cpu/sgx/ioctl.c            |  38 ------
 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c |   2 +-
 fs/coda/file.c                             |   2 +-
 fs/overlayfs/file.c                        |   2 +-
 include/linux/fs.h                         |  12 +-
 include/linux/mm.h                         |   2 +-
 ipc/shm.c                                  |   2 +-
 mm/mmap.c                                  |  10 +-
 mm/nommu.c                                 |   4 +-
 13 files changed, 193 insertions(+), 53 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2022-03-08 12:51 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-06  5:32 [PATCH RFC 0/3] MAP_POPULATE for device memory Jarkko Sakkinen
2022-03-06  5:32 ` [Intel-gfx] " Jarkko Sakkinen
2022-03-06  5:32 ` Jarkko Sakkinen
2022-03-06  5:32 ` [PATCH RFC 1/3] mm: Add f_ops->populate() Jarkko Sakkinen
2022-03-06  5:32   ` [Intel-gfx] " Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06 10:01   ` Greg Kroah-Hartman
2022-03-06 10:01     ` [Intel-gfx] " Greg Kroah-Hartman
2022-03-06 10:01     ` Greg Kroah-Hartman
2022-03-06 17:02     ` Jarkko Sakkinen
2022-03-06 17:02       ` [Intel-gfx] " Jarkko Sakkinen
2022-03-06 17:02       ` Jarkko Sakkinen
2022-03-06 17:03       ` Jarkko Sakkinen
2022-03-06 17:03         ` [Intel-gfx] " Jarkko Sakkinen
2022-03-06 17:03         ` Jarkko Sakkinen
2022-03-06 22:43       ` Matthew Wilcox
2022-03-06 22:43         ` [Intel-gfx] " Matthew Wilcox
2022-03-06 22:43         ` Matthew Wilcox
2022-03-07 13:16         ` Jarkko Sakkinen
2022-03-07 13:16           ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 13:16           ` Jarkko Sakkinen
2022-03-07 13:26           ` Jarkko Sakkinen
2022-03-07 13:26             ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 13:26             ` Jarkko Sakkinen
2022-03-06  5:32 ` [PATCH RFC 2/3] x86/sgx: Export sgx_encl_page_alloc() Jarkko Sakkinen
2022-03-06  5:32   ` [Intel-gfx] " Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06  5:32 ` [PATCH RFC 3/3] x86/sgx: Implement EAUG population with MAP_POPULATE Jarkko Sakkinen
2022-03-06  5:32   ` [Intel-gfx] " Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06  8:30 ` [PATCH RFC 0/3] MAP_POPULATE for device memory David Laight
2022-03-06  8:30   ` [Intel-gfx] " David Laight
2022-03-06  8:30   ` David Laight
2022-03-06 16:52   ` 'Jarkko Sakkinen'
2022-03-06 16:52     ` [Intel-gfx] " 'Jarkko Sakkinen'
2022-03-06 16:52     ` 'Jarkko Sakkinen'
2022-03-06 11:33 ` Matthew Wilcox
2022-03-06 11:33   ` [Intel-gfx] " Matthew Wilcox
2022-03-06 11:33   ` Matthew Wilcox
2022-03-07  7:48   ` Christoph Hellwig
2022-03-07  7:48     ` [Intel-gfx] " Christoph Hellwig
2022-03-07 13:29     ` Jarkko Sakkinen
2022-03-07 13:29       ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 13:29       ` Jarkko Sakkinen
2022-03-07 15:56       ` Christoph Hellwig
2022-03-07 15:56         ` [Intel-gfx] " Christoph Hellwig
2022-03-07 15:58         ` Jarkko Sakkinen
2022-03-07 15:58           ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 15:58           ` Jarkko Sakkinen
2022-03-07 22:11         ` David Laight
2022-03-07 22:11           ` [Intel-gfx] " David Laight
2022-03-07 22:11           ` David Laight
2022-03-08 10:10           ` Jarkko Sakkinen
2022-03-08 10:10             ` [Intel-gfx] " Jarkko Sakkinen
2022-03-08 10:10             ` Jarkko Sakkinen
2022-03-07 10:12 ` David Hildenbrand
2022-03-07 10:12   ` [Intel-gfx] " David Hildenbrand
2022-03-07 10:12   ` David Hildenbrand
2022-03-07 14:22   ` Jarkko Sakkinen
2022-03-07 14:22     ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 14:22     ` Jarkko Sakkinen
2022-03-07 14:33     ` David Hildenbrand
2022-03-07 14:33       ` [Intel-gfx] " David Hildenbrand
2022-03-07 14:33       ` David Hildenbrand
2022-03-07 15:49       ` Jarkko Sakkinen
2022-03-07 15:49         ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 15:49         ` Jarkko Sakkinen
2022-03-07 14:23 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork

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.