All of lore.kernel.org
 help / color / mirror / Atom feed
* ensure device private pages have an owner v2
@ 2020-03-16 19:32 ` Christoph Hellwig
  0 siblings, 0 replies; 196+ messages in thread
From: Christoph Hellwig @ 2020-03-16 19:32 UTC (permalink / raw)
  To: Jason Gunthorpe, Dan Williams, Bharata B Rao,
	Christian König, Ben Skeggs
  Cc: Jerome Glisse, kvm-ppc, amd-gfx, dri-devel, nouveau, linux-mm

When acting on device private mappings a driver needs to know if the
device (or other entity in case of kvmppc) actually owns this private
mapping.  This series adds an owner field and converts the migrate_vma
code over to check it.  I looked into doing the same for
hmm_range_fault, but as far as I can tell that code has never been
wired up to actually work for device private memory, so instead of
trying to fix some unused code the second patch just remove the code.
We can add it back once we have a working and fully tested code, and
then should pass the expected owner in the hmm_range structure.

Changes since v1:
 - split out the pgmap->owner addition into a separate patch
 - check pgmap->owner is set for device private mappings
 - rename the dev_private_owner field in struct migrate_vma to src_owner
 - refuse to migrate private pages if src_owner is not set
 - keep the non-fault device private handling in hmm_range_fault


^ permalink raw reply	[flat|nested] 196+ messages in thread
* ensure device private pages have an owner
@ 2020-03-16 17:52 ` Christoph Hellwig
  0 siblings, 0 replies; 196+ messages in thread
From: Christoph Hellwig @ 2020-03-16 17:52 UTC (permalink / raw)
  To: Jason Gunthorpe, Dan Williams, Bharata B Rao,
	Christian König, Ben Skeggs
  Cc: Jerome Glisse, kvm-ppc, amd-gfx, dri-devel, nouveau, linux-mm

When acting on device private mappings a driver needs to know if the
device (or other entity in case of kvmppc) actually owns this private
mapping.  This series adds an owner field and converts the migrate_vma
code over to check it.  I looked into doing the same for
hmm_range_fault, but as far as I can tell that code has never been
wired up to actually work for device private memory, so instead of
trying to fix some unused code the second patch just remove the code.
We can add it back once we have a working and fully tested code, and
then should pass the expected owner in the hmm_range structure.


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

end of thread, other threads:[~2020-03-23  5:03 UTC | newest]

Thread overview: 196+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 19:32 ensure device private pages have an owner v2 Christoph Hellwig
2020-03-16 19:32 ` Christoph Hellwig
2020-03-16 19:32 ` Christoph Hellwig
2020-03-16 19:32 ` [PATCH 1/4] memremap: add an owner field to struct dev_pagemap Christoph Hellwig
2020-03-16 19:32   ` Christoph Hellwig
2020-03-16 19:32   ` Christoph Hellwig
2020-03-16 20:55   ` Ralph Campbell
2020-03-16 20:55     ` Ralph Campbell
2020-03-16 20:55     ` Ralph Campbell
2020-03-16 20:55     ` Ralph Campbell
2020-03-16 20:55     ` Ralph Campbell
2020-03-16 19:32 ` [PATCH 2/4] mm: handle multiple owners of device private pages in migrate_vma Christoph Hellwig
2020-03-16 19:32   ` Christoph Hellwig
2020-03-16 19:32   ` Christoph Hellwig
2020-03-16 21:43   ` Ralph Campbell
2020-03-16 21:43     ` Ralph Campbell
2020-03-16 21:43     ` Ralph Campbell
2020-03-16 21:43     ` Ralph Campbell
2020-03-16 21:43     ` Ralph Campbell
2020-03-16 19:32 ` [PATCH 3/4] mm: simplify device private page handling in hmm_range_fault Christoph Hellwig
2020-03-16 19:32   ` Christoph Hellwig
2020-03-16 19:32   ` Christoph Hellwig
2020-03-16 19:59   ` Jason Gunthorpe
2020-03-16 19:59     ` Jason Gunthorpe
2020-03-16 19:59     ` Jason Gunthorpe
2020-03-16 19:59     ` Jason Gunthorpe
2020-03-16 21:33     ` Christoph Hellwig
2020-03-16 21:33       ` Christoph Hellwig
2020-03-16 21:33       ` Christoph Hellwig
2020-03-16 22:49   ` Ralph Campbell
2020-03-16 22:49     ` Ralph Campbell
2020-03-16 22:49     ` Ralph Campbell
2020-03-16 22:49     ` Ralph Campbell
2020-03-16 22:49     ` Ralph Campbell
2020-03-17  7:34     ` Christoph Hellwig
2020-03-17  7:34       ` Christoph Hellwig
2020-03-17  7:34       ` Christoph Hellwig
2020-03-17 22:43       ` Ralph Campbell
2020-03-17 22:43         ` Ralph Campbell
2020-03-17 22:43         ` Ralph Campbell
2020-03-17 22:43         ` Ralph Campbell
2020-03-18  9:34         ` Christoph Hellwig
2020-03-18  9:34           ` Christoph Hellwig
2020-03-18  9:34           ` Christoph Hellwig
2020-03-17 12:15     ` Jason Gunthorpe
2020-03-17 12:15       ` Jason Gunthorpe
2020-03-17 12:15       ` Jason Gunthorpe
2020-03-17 12:15       ` Jason Gunthorpe
2020-03-17 12:24       ` Christoph Hellwig
2020-03-17 12:24         ` Christoph Hellwig
2020-03-17 12:24         ` Christoph Hellwig
2020-03-17 12:28         ` Christoph Hellwig
2020-03-17 12:28           ` Christoph Hellwig
2020-03-17 12:28           ` Christoph Hellwig
2020-03-17 12:47           ` Jason Gunthorpe
2020-03-17 12:47             ` Jason Gunthorpe
2020-03-17 12:47             ` Jason Gunthorpe
2020-03-17 12:47             ` Jason Gunthorpe
2020-03-17 12:59             ` Christoph Hellwig
2020-03-17 12:59               ` Christoph Hellwig
2020-03-17 12:59               ` Christoph Hellwig
2020-03-17 17:32               ` Jason Gunthorpe
2020-03-17 17:32                 ` Jason Gunthorpe
2020-03-17 17:32                 ` Jason Gunthorpe
2020-03-17 17:32                 ` Jason Gunthorpe
2020-03-17 17:32                 ` Jason Gunthorpe
2020-03-17 23:14               ` Ralph Campbell
2020-03-17 23:14                 ` Ralph Campbell
2020-03-17 23:14                 ` Ralph Campbell
2020-03-17 23:14                 ` Ralph Campbell
2020-03-19 18:17                 ` Jason Gunthorpe
2020-03-19 18:17                   ` Jason Gunthorpe
2020-03-19 18:17                   ` Jason Gunthorpe
2020-03-19 18:17                   ` Jason Gunthorpe
2020-03-19 22:56                   ` Ralph Campbell
2020-03-19 22:56                     ` Ralph Campbell
2020-03-19 22:56                     ` Ralph Campbell
2020-03-19 22:56                     ` Ralph Campbell
2020-03-20  0:03                     ` Jason Gunthorpe
2020-03-20  0:03                       ` Jason Gunthorpe
2020-03-20  0:03                       ` Jason Gunthorpe
2020-03-20  0:03                       ` Jason Gunthorpe
2020-03-21  8:20                       ` Christoph Hellwig
2020-03-21  8:20                         ` Christoph Hellwig
2020-03-21  8:20                         ` Christoph Hellwig
2020-03-20  0:14                 ` Jason Gunthorpe
2020-03-20  0:14                   ` Jason Gunthorpe
2020-03-20  0:14                   ` Jason Gunthorpe
2020-03-20  0:14                   ` Jason Gunthorpe
2020-03-20  1:33                   ` Ralph Campbell
2020-03-20  1:33                     ` Ralph Campbell
2020-03-20  1:33                     ` Ralph Campbell
2020-03-20  1:33                     ` Ralph Campbell
2020-03-20 12:58                     ` Jason Gunthorpe
2020-03-20 12:58                       ` Jason Gunthorpe
2020-03-20 12:58                       ` Jason Gunthorpe
2020-03-20 12:58                       ` Jason Gunthorpe
2020-03-20 12:58                       ` Jason Gunthorpe
2020-03-16 19:32 ` [PATCH 4/4] mm: check the device private page owner " Christoph Hellwig
2020-03-16 19:32   ` Christoph Hellwig
2020-03-16 19:32   ` Christoph Hellwig
2020-03-16 19:49   ` Jason Gunthorpe
2020-03-16 19:49     ` Jason Gunthorpe
2020-03-16 19:49     ` Jason Gunthorpe
2020-03-16 19:49     ` Jason Gunthorpe
2020-03-16 23:11   ` Ralph Campbell
2020-03-16 23:11     ` Ralph Campbell
2020-03-16 23:11     ` Ralph Campbell
2020-03-16 23:11     ` Ralph Campbell
2020-03-16 23:11     ` Ralph Campbell
2020-03-20 13:41   ` Jason Gunthorpe
2020-03-20 13:41     ` Jason Gunthorpe
2020-03-20 13:41     ` Jason Gunthorpe
2020-03-20 13:41     ` Jason Gunthorpe
2020-03-21  8:22     ` Christoph Hellwig
2020-03-21  8:22       ` Christoph Hellwig
2020-03-21  8:22       ` Christoph Hellwig
2020-03-21 12:38       ` Jason Gunthorpe
2020-03-21 12:38         ` Jason Gunthorpe
2020-03-21 12:38         ` Jason Gunthorpe
2020-03-21 12:38         ` Jason Gunthorpe
2020-03-21 15:18         ` Christoph Hellwig
2020-03-21 15:18           ` Christoph Hellwig
2020-03-21 15:18           ` Christoph Hellwig
2020-03-17  5:31 ` ensure device private pages have an owner v2 Bharata B Rao
2020-03-17  5:43   ` Bharata B Rao
2020-03-17  5:31   ` Bharata B Rao
2020-03-19  0:28 ` Jason Gunthorpe
2020-03-19  0:28   ` Jason Gunthorpe
2020-03-19  0:28   ` Jason Gunthorpe
2020-03-19  0:28   ` Jason Gunthorpe
2020-03-19  7:16   ` Christoph Hellwig
2020-03-19  7:16     ` Christoph Hellwig
2020-03-19  7:16     ` Christoph Hellwig
2020-03-19 11:50     ` Jason Gunthorpe
2020-03-19 11:50       ` Jason Gunthorpe
2020-03-19 11:50       ` Jason Gunthorpe
2020-03-19 11:50       ` Jason Gunthorpe
2020-03-19 18:50     ` Jason Gunthorpe
2020-03-19 18:50       ` Jason Gunthorpe
2020-03-19 18:50       ` Jason Gunthorpe
2020-03-19 18:50       ` Jason Gunthorpe
  -- strict thread matches above, loose matches on Subject: below --
2020-03-16 17:52 ensure device private pages have an owner Christoph Hellwig
2020-03-16 17:52 ` Christoph Hellwig
2020-03-16 17:52 ` Christoph Hellwig
2020-03-16 17:52 ` [PATCH 1/2] mm: handle multiple owners of device private pages in migrate_vma Christoph Hellwig
2020-03-16 17:52   ` Christoph Hellwig
2020-03-16 17:52   ` Christoph Hellwig
2020-03-16 18:17   ` Jason Gunthorpe
2020-03-16 18:17     ` Jason Gunthorpe
2020-03-16 18:17     ` Jason Gunthorpe
2020-03-16 18:17     ` Jason Gunthorpe
2020-03-16 18:20     ` Christoph Hellwig
2020-03-16 18:20       ` Christoph Hellwig
2020-03-16 18:20       ` Christoph Hellwig
2020-03-16 17:52 ` [PATCH 2/2] mm: remove device private page support from hmm_range_fault Christoph Hellwig
2020-03-16 17:52   ` Christoph Hellwig
2020-03-16 17:52   ` Christoph Hellwig
2020-03-16 18:42   ` Ralph Campbell
2020-03-16 18:42     ` Ralph Campbell
2020-03-16 18:42     ` Ralph Campbell
2020-03-16 18:42     ` Ralph Campbell
2020-03-16 18:42     ` Ralph Campbell
2020-03-16 18:49     ` Christoph Hellwig
2020-03-16 18:49       ` Christoph Hellwig
2020-03-16 18:49       ` Christoph Hellwig
2020-03-16 18:58       ` Christoph Hellwig
2020-03-16 18:58         ` Christoph Hellwig
2020-03-16 18:58         ` Christoph Hellwig
2020-03-16 19:56       ` Ralph Campbell
2020-03-16 19:56         ` Ralph Campbell
2020-03-16 19:56         ` Ralph Campbell
2020-03-16 19:56         ` Ralph Campbell
2020-03-16 20:09       ` Jason Gunthorpe
2020-03-16 20:09         ` Jason Gunthorpe
2020-03-16 20:09         ` Jason Gunthorpe
2020-03-16 20:09         ` Jason Gunthorpe
2020-03-16 20:24         ` Ralph Campbell
2020-03-16 20:24           ` Ralph Campbell
2020-03-16 20:24           ` Ralph Campbell
2020-03-16 20:24           ` Ralph Campbell
2020-03-17 11:56           ` Jason Gunthorpe
2020-03-17 11:56             ` Jason Gunthorpe
2020-03-17 11:56             ` Jason Gunthorpe
2020-03-17 11:56             ` Jason Gunthorpe
2020-03-17 22:46             ` Ralph Campbell
2020-03-17 22:46               ` Ralph Campbell
2020-03-17 22:46               ` Ralph Campbell
2020-03-17 22:46               ` Ralph Campbell
2020-03-16 19:04     ` Jason Gunthorpe
2020-03-16 19:04       ` Jason Gunthorpe
2020-03-16 19:04       ` Jason Gunthorpe
2020-03-16 19:04       ` Jason Gunthorpe
2020-03-16 19:07       ` Christoph Hellwig
2020-03-16 19:07         ` Christoph Hellwig
2020-03-16 19:07         ` Christoph Hellwig

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.